Most voted "json" questions
JSON (Javascript Object Notation - Javascript Object Notation) is a lightweight data exchange formatting. For humans, it is easy to read and write. For machines, it is easy to interpret and generate. It is based on a subset of the Javascript programming language, Standard ECMA-262 3rd Edition - December/1999.
Learn more…3,116 questions
Sort by count of
-
0
votes1
answer100
viewsFloat with Spring null value
I have an application with Spring Data. Calling the Spring findAll() method, there are null values in the database. When setting the object the field comes with null value triggering the error…
-
0
votes1
answer52
viewsFailed to pass check (date.Success)
I have the following code: $.ajax( { type: 'GET', url : "chat/updates/", async : true, cache : false, success: function(data){ if(data.success){ alert(data) thread = data.messages; senders =…
-
0
votes0
answers288
viewsSave JSON data using Laravel
When saving data to the database Mysql with the column of the type JSON using the Laravel. He inserts the data this way:…
-
0
votes1
answer135
viewsHow to interact with database data with Javascript
I was looking to build a chart with HTML Canvas using Javascript as well. The required data is in the Mysql database. However, how can I interact and access this data from the Javascript database,…
-
0
votes1
answer173
viewsAjax/JSON returning Undefined
When making an ajax request with JSON return I am receiving Undefined, when showing the data in the console, I receive the code from php page. Can someone help me identify the mistake? Page:…
-
0
votes2
answers295
viewsHow to read JSON data sent by javascript in PHP
I want to pass a form via json pro my php to then insert the data in the bd. function enviaDados(form){ var dados = document.getElementById('form'); console.log(dados.categoria.value); $.ajax({…
-
0
votes1
answer333
viewsGet the last json data in php
Galera follows the code below that lists all. need only the last given latitude and longitude $conteudo =…
-
0
votes1
answer711
viewsReturn Json and Put to Multidimensional Array
I’m making a request to plot a chart using Flot Js. I’m returning a Json like this: [{ "status": "Finalizado", "id_status": "4", "total_chamado": "2", "mes": "4", "ano": "2015" }, { "status":…
-
0
votes1
answer798
viewsHow to change a php object’s value
I’m passing an object created in a jQuery file to php and getting it from the following code. $data = $_POST['data']; $d = json_decode($data); $user = $d->user; $season = $d->season;…
-
0
votes1
answer64
viewsDoubt Return API Json Android
I recently read a lot about getting data through an API on Android, but I can’t get what’s being returned in Json from a specific API shown below. { "Sumario": { "Termo": "teste", "Tipo": "teste",…
-
0
votes1
answer112
viewsProvide a downloadable file in an API that returns JSON
Hello, I am developing a Java API. It is basically a java Servlet that returns content in json (application/json). With a Tomcat server. One of the response fields is supposed to be a link to the…
-
0
votes1
answer389
viewsChange title color in google graphics
I’m making a chart using google Harts and want to change the title color. My chart settings are through a json file: 'config' => array( 'title' => 'Despesas', 'width' => 400, 'height' =>…
-
0
votes1
answer189
viewsGet Json response from URL
Folks I’m trying to get JSON response from the URL below: https://www.cryptocompare.com/api/data/coinsnapshotfullbyid/? id=1182. I’ve tried it in Php and Jquery, and I can’t get the answer. If you…
-
0
votes1
answer65
viewsCan Expressjs be used in production?
I recently saw a course where Expressjs was used for backend testing in JSON for an application and I was amazed, but I came up with several questions: Could it be used in production? Can the most…
-
0
votes1
answer85
viewsMake an httprequest call with Curl
I have a url of an api that returns me a json, and I wanted to make a request for the information to be updated, and then decoded through json_decode, so I know I would have to make an httprequest…
-
0
votes1
answer36
viewsHow to Capture This Array
I’m trying to make a API. This is my code: require('conexao/conexao.php'); $jsonObj= array(); $query="SELECT * FROM filmes"; $sql = mysql_query($query)or die(mysql_error()); while($data =…
-
0
votes1
answer197
viewsMysql return JSON
I am trying to do this example but, is giving error: #1582 - Incorrect Parameter Count in the call to Native Function 'JSON_OBJECT' SELECT JSON_OBJECT('City', Name, 'Dist', District, 'Pop',…
-
0
votes2
answers91
viewsCreate associative array with other PHP arrays to use as JSON return
As an example, I’m going to use what I was given very simply, this Array will be obtained from data from a query of a BD: $S1 = [[0,100], [1,200], [2,700]]; $S2 = [[0,700], [1,300], [2,400]]; $Label…
-
0
votes0
answers290
viewsHow do I save data to a JSON file using Javascript?
I would like to take the output of the console.log and keep saving in a file . JSON and then get a search inside it
-
0
votes1
answer214
viewsJava Restful API gets wrong date from POST JSON
I have a java Rest API that is getting the wrong date. Javascript sends the following JSON: { "pessdtcad": "2018-02-24", "dataNascimento": "1984-05-18", "nome": "GUSTAVO DE FREITAS", "sexo": "M", }…
-
0
votes1
answer242
viewsHow to extract a value from a JSON return
I have the following JSON { "cep": "11702-705", "logradouro": "Avenida Presidente Castelo Branco", "complemento": "de 4224 a 4800 - lado par", "bairro": "Aviação", "localidade": "Praia Grande",…
-
0
votes2
answers287
viewsUpload with json+Modal+Javascript
Good evening, I need a help, I am uploading multiple files in a modal, but the return of php does not occur as expected. Calling to MODAL: $('button.btnaddimg').on('click', function (e) {…
-
0
votes2
answers349
viewsHow to declare a javascript array that will receive a JSON array
Given the interface: export interface Pergunta { id: number titulo: string opcoes:[] } I want the options array to receive its options array: { "id": "1", "titulo": "Qual o seu comportamento em…
-
0
votes3
answers861
viewsString reading Json format for c#
Hello, I’m having several weeks how to do to read the values of string below, I would like to read the value and on the sites is very confused in the search why the type json that I have begins with…
-
0
votes1
answer160
viewsHow to insert information into a Json object?
My problem is similar to that question: Question Stackoverflow But in this case the object is used Json to popular the table. Controller public ActionResult GetDadosItensVenda(int? Codigo) { try {…
-
0
votes1
answer66
viewshow to mount the json of that call
I’m having a problem I don’t know how to build the json of this call in php to send by Curl someone could help me? "auto_recurring": { "frequency": 1, "frequency_type": "months",…
-
0
votes1
answer198
viewsCaching a JSON query in IONIC 3
Hello, I have an App that consumes JSON and lists the data, so far so good. My difficulty is in keeping this data for offline access. I want to consult after you’re offline. P.S.: I’ve been testing…
-
0
votes0
answers220
viewsExtract JSON data on Android received by Datasnap
I have never worked with datasnap do not know how to extract! Someone can give me a help, I leave the code I have: DSRESTConnection conn = new DSRESTConnection(); conn.setHost("54.207.112.131");…
-
0
votes1
answer75
viewsJarray add values
How to add a set of values JArray in an existing json. void adicionar(string name, string gamedir, string, lastVersionid, string javaArgs) { /* adiciona ao json existente... */ } Existing json…
-
0
votes1
answer89
viewsInclude variable in json output
if($_GET['operacao'] == 'banners'){ header('Content-Type: application/json; charset=utf-8'); $rs = $mysqli->query("SELECT foto AS image FROM banners"); $registros = mysqli_num_rows($rs); $arr =…
-
0
votes2
answers407
viewsSort objects in json file (Java)
I have the following JSON file: {"idAluno":1,"nomeAluno":"Teste","listaDeTurmas":[1,2,3,4]} {"idAluno":4,"nomeAluno":"Teste","listaDeTurmas":[1,2,3,4]}…
-
0
votes1
answer216
viewshow to put the return of a json in a specific place of a table?
I have a fixed table with schedules from 08:00am to 19:00pm each has its line with its description(that would be the type of query) I receive a json on my page when selecting a date on my datepicker…
-
0
votes1
answer103
viewsProblems adding Jsonobject to Jsonarray
import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonObject; import javax.json.JsonValue; // código JsonObject object = Json.createObjectBuilder().build(); JsonArray array =…
-
0
votes1
answer119
viewsAnd in what context can the use of JSON be advantageous compared to the use of XML (in web applications)?
I have this question in a simulated test. Besides the ease of writing the Json, and the fact that it is well oriented to objects, what could be the advantages? The topic: Why and when to use XML…
-
0
votes1
answer153
viewsExchange values from a div
I have a combo when the event occurs onchange it performs a query in the database with the selected value and inserts it into a div values, the problem is that when I apply…
-
0
votes0
answers73
viewsWhy does my xmlhttp.status return zero?
I got a problem in my html, I try to catch a json, but the xmlhttp.status is always 0(zero). I researched about it, but found nothing very concrete. Below, I simplified the code to highlight the…
-
0
votes0
answers103
viewsAssign very large Json to a variable in String form
I want to run some tests on an algorithm I’m developing with this Json. To test this type of input, I always created a variable by assigning the json between crases, so the variable kept the string…
-
0
votes1
answer99
viewsIntel XDK $.getJSON does not return php value
I’m making a query in mysql using the $.getJSON, but I’m not getting back the value. test page: <!doctype html> <html> <head> <meta charset="utf-8">…
-
0
votes1
answer239
viewsC# - Decode JSON array
I need to get the id of that code JSON using C#: [{"nome":"Gabriel Ferreira","cidade":"São Paulo","uf":"SP","id":"4274892"}] Can someone advise me how I can do this in the best way, because I’ve…
-
0
votes1
answer374
viewsReturn ajax error when have accent
I have a table that when I include some text that contains accent add all other texts of the same condition. tried several ways to use UTF-8 I found on the net but none worked and I noticed in the…
-
0
votes0
answers23
viewsAccent error in json with php
Can you help me? I have a code that looks like this: $var = "Paraná"; echo $var; $json = json_encode($var); echo $json; In the echo of $var, returns me: Paraná. In the echo of $json returns me:…
-
0
votes1
answer103
viewsRead Json Object with PHP
Good evening I’m trying to read the following json with php: { "kind": "customsearch#search", "url": { "type": "application/json", "template":…
-
0
votes2
answers2568
viewsReceive PHP Json POST
I am trying to receive in PHP a Json via POST and display it on the screen, the Json is sent through an API that does not have access to the script you send, I am trying to print on the screen…
-
0
votes1
answer361
views -
0
votes1
answer88
viewsIs it possible to separate the value from the JSON item?
Let’s say I have such an object: { "parametros": { "carteira": "RG", "taxaboleto": "0.00", "multa": "0.00", "juros": "0.00" } } Is it possible that I can extract the name of the object item? For…
-
0
votes1
answer76
viewsConsultation of very slow cep
date_default_timezone_set('America/Sao_Paulo'); include 'conn.php'; $query = $mysql_adv->query("SELECT * FROM dados"); while($row = $query->fetch_array()){ $url =…
-
0
votes1
answer98
viewsHow to pass items from an [Object Object] to the parent json
Hello the server is returning me the following json this.itens = { id: '', data: '', hora: '', cliente:{ nome: '', cpf: '' } } i need the customer data not to stay in a second json but in an ex…
-
0
votes2
answers128
viewsHow to optimize the performance of my application when doing Httpclient resquisitions
I’m developing an app using Xamarin.Forms, but I have a problem. Settings like color, company name, cover image and soon comes through a request for a call to web service whose return is a JSON, but…
-
0
votes2
answers98
viewsReturn n last record of a JSON file in php
PHP doubt with JSON: I already know how to loop a JSON file and show all records and also show only the last record using END. Can I show the last 5, 10 record, for example?
-
0
votes1
answer256
viewsConnection android webservice
Hello, folks I am developing an app in the Android Studio IDE and am having problems connecting to my webservice. I am receiving error: D/Answer: {"Success":"false","message":"A Jsonobject text must…