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
-
4
votes2
answers4908
viewsTake the value of the Avascript table and place it in an array
I have a problem, I made a dynamic table in Javascript and I want to play your data in an array, I tried to use JSON but when I click on the button to run the event it does nothing. I don’t know if…
-
4
votes0
answers57
viewsJointjs: Embed Parents and Children
Good, I’m working with Jointjs but in a dynamic way. I am currently trying to embed the 'Parent' and 'Child' elements'. After selecting with the Child and Parent info, I get to get this information:…
-
4
votes1
answer792
viewsChained Select: how to select Brazilian municipalities in a JSON file from the state select
EDITION In case, in the future, someone needs the jQuery version. Here is the code: //select encadeado com JSON $('#uf').on('change', function () { var estado = $(this).val(), cidade =…
-
4
votes5
answers1602
viewsChange return /Date(1386295200000)/ to date format
I have a return from json that comes so from SqlServer: /Date(1386295200000)/ How to convert to date format dd/mm/yyyy?
-
4
votes1
answer278
viewsView json value in a div
How to make a value that is in JS appear in html content? app js. // BUSCA OCORRENCIAS $("#menuOcorrencia").click(function() { var operacao = "selectOcorrencias";…
-
4
votes1
answer110
viewsDeserialize Json List
For when the return is only 1 record I use the following: { "id": "27", "name": "Daft Punk", "link": "https://www.deezer.com/artist/27", "share":…
-
4
votes1
answer309
viewsHow to handle a JSON format string?
Let’s say I receive the following content that is stored in a String: { "client_id": 1580, "videos": 4, "remote_urls": [{ "url": "rtsp://aniceurl.com" }, { "url": "rtsp://aniceurl.com" }, { "url":…
-
4
votes1
answer978
viewsPass a view JSON to the route
I’m trying to send a JSON of view for a route, but I’m not getting it. Unfortunately I know little about JSON, ajax, GET and POST. In the view, the json: var json = { "numeroMesa": numeroMesa,…
-
4
votes1
answer1086
viewsJSON return from Google API
I make a request to a Google API (API Web Service), in which returns me a JSON (Matrix)... My problem is when trying to extract data that are Arrays within Arrays... As the data from the "Photos"…
-
4
votes2
answers260
viewsHow do I edit a JSON within my database?
I have a JSON saved in my database. I would like to know how to edit this json using PHP and saving it again in the database. The json that would like to change the value is this…
-
4
votes3
answers1322
viewsAdd "name" to a JSON object
My JSON currently returns this low code: {"2":"aluno","8":"barbara_cristina","13":"carolina_deus"} Is there a way in places of numbers 2, 8 and 13 I could add a "header"? I wanted it to be like…
-
4
votes3
answers4243
viewsHow to check if return from Ajax is JSON or String?
My code is like this: sendAjax(new FormData(this), function(retorno) { if(retorno.isArray) { $(".erro-login strong").text("ID: " + retorno.id + " usuário: " + retorno.usuario);…
-
4
votes2
answers425
viewsWhat’s the difference between "require" and "require-dev"?
In the Composer, Grunt for example, has the require and the require-dev. My question is what’s the difference between them? Example phpBB "require": { "php": ">=5.3.3,<7.0",…
-
4
votes1
answer505
viewsSearch Matrix index from json value using the index
I have the following matrix: var usuarios = [ {nome: "João", id: 1}, {nome: "Maria", id: 2}, {nome: "José", id: 3}, {nome: "Ana", id: 4}, ]; I need to return the José user index. I tried using the…
-
4
votes4
answers1313
viewsHow to organize alphabetically a select obtained through a JSON?
I rode a select through the JSON below, the only problem is that it follows the order of the key, how to arrange it alphabetically? { "12": "Acre", "27": "Alagoas", "16": "Amapá", "13": "Amazonas",…
-
4
votes1
answer1658
viewsIssues with accentuation when reading data from JSON file
The method below is extracting data from a JSON file, to fill a Dropdownlist. public static List<Uf> GetAll() { var client = new WebClient(); JsonSerializerSettings settings = new…
-
4
votes2
answers729
viewsPHP json_encode with Boolean and decimal values
I have a PHP function that takes data from the database and returns an array with the results. This array by default has all the data as type string, but some fields should be treated as Boolean…
-
4
votes1
answer1327
viewsHelp JSON Delphi
Good afternoon! Could you help me read this JSON file in Delphi. I have tried several classes, including the native Delphi and I was able to read only the data of the first node, as status. I use…
-
4
votes2
answers10681
viewsGrabbing all the Values of a JSON Object
I wonder how to get all the values of a part of the JSON: { "Message": "The request is invalid.", "ModelState": { "produto.pro_descricao": ["Informe a descrição do Produto."], "produto.pro_grupo":…
-
4
votes2
answers1028
viewsHow to perform an Insert or update of a JSON object
JSON object $postdata: { "0": { "codigo": "1", "descricao": "Bobina", "preco": "10.0000" }, "1": { "codigo": "2", "descricao": "Capa", "preco": "20.0000" } } Using Mysql, how to perform insert if…
-
4
votes2
answers1256
viewshow to read the return variables using json Curl and php
My problem refers to integration with Cielo and I’ve reviewed everything, but without success. I read this post: /questions/54039/na-api-da-cielo-em-php "I understood" what I said in the post and I…
-
4
votes1
answer746
viewsLoop in json that returns all records
I’m developing a system, in it I do a search with ajax and it returns a json with the bank records, but I couldn’t draw up a loop in the PHP so that the json could return all records. Below follows…
-
4
votes1
answer1028
viewsDelphi - Datasnap - Rest - Tservermethods1
I’m running some Datasnap tests with REST and json. Back at the Unit ServerMethods, that Delphi itself creates, has the function ReverseString, but well, how do I know who sent it? I’d like to keep…
-
4
votes1
answer549
viewsAjax Request Does Not Work - Success Does Not Work
I did the following function: $("#CategoryList").change(function () { $("#SubCategoryDropDown").empty(); $.ajax({ dataType: "json", url: '@Url.Action("GetSubCategory", "ProjectSubCategories")',…
-
4
votes0
answers368
viewsERROR: null value in column "id_municipio_id_municipio" violates the non-null restriction
This error is occurring when I try to persist the screen data to the database. I checked, by debugging the screen, that the data is being captured. When the method exits line 33 of the image it goes…
-
4
votes3
answers6016
viewsConvert JSON to EXCEL
I carry out a consultation ajax that returns me a Json with object array, how can I transform this json in excel? Example of my json: [ {idcancelamento: "383", idcliente: "2409", emailcancelamento:…
-
4
votes1
answer90
views -
4
votes2
answers373
viewsConcatenate variable into array
I have to requisition one json for a api, but I have to redeem data from a form to complement this json, the problem is that when rescuing the data into a variable I cannot put it in the correct way…
-
4
votes1
answer369
viewsHow do I relate tables with json returns to php?
Please help, I’m new to programming and I need to do a table relationship Mysql, with return in JSON, I tried the following code, but it is in error. I already searched a lot on Google and Youtube,…
-
4
votes2
answers167
viewsDeserialize Json string[] for string[]
I have the following JSON: {"TicketID":["116","114","112","108","107","104","102"]} When I try to deserialize string[] get the bug: Server Error in Application '/'. No constructor without parameters…
-
4
votes4
answers7563
viewsHow to include and manipulate local JSON file?
I use JSON data to create the <options> of a <select>: jsonOptions.forEach(function(item) { var option = document.createElement('option'); option.text = item.description; option.value =…
-
4
votes2
answers59
viewsFetch values in an object
I’m trying to access properties of an object, a dictionary. However the references are in format {String} and its concatenation through a point (.) and I’m using split() to break this {String} in a…
-
4
votes1
answer2980
viewsC# Console Application. Read Json File
I have a Json file and it always gives error when I try to read it. I believe because it is an array within another array and I cannot read. Json: { "map": [ ["S", "S", "S", "S"], ["S", "S", "C",…
-
4
votes1
answer799
viewsRead JSON with Delphi 6
I have a JSON file, but I would like to read it using Delphi 6. It would be possible? Follow an example from JSON { "size":1, "response":[ { "id_cliente":21, "nome":"DESENTUPIDORA ME",…
-
4
votes2
answers679
viewsMaintain item order in JSON
Have to maintain the order of the items that came in JSON of a API? This is like this coming from API: {"6":"Abadia","218":"Abel Reis","44":"Alexandre Campos - Jardim","13":"Alfredo Freire…
-
4
votes1
answer112
viewsjQuery cutting words with space
I have a screen where the lines are loaded according to the data of the database and for this I have a PHP+jQuery and related to the creation of the same. What happens is that the array that sends…
-
4
votes1
answer153
viewsSearch localStorage Json object list for your key name
I know that the browser localStorage stores data in the key-value format, and that I can recover the Json objects saved there through the key. Now what I need to do is retrieve all the records whose…
-
4
votes1
answer664
viewsWeather API - Cities with accent give error
I have the following Endpoint in which you receive in the URI the name of the city and the state: @RequestMapping(value= "/clima/{nomeCidade}/{ufCidade}/agora", method = {RequestMethod.GET,…
-
4
votes2
answers465
viewsHow to change the JSON serialization format of PHP Datetime?
In PHP, when I use a json_encode on an object of the type DateTime, it displays the following result: $date = new DateTime(); echo json_encode(compact('date'), JSON_PRETTY_PRINT); Exit: { "date": {…
-
4
votes0
answers222
viewsTreating JSON Response with Retrofit in Android Studio
To be clear, I am developing a simple application test, where my user type the Cpf of a registered customer and their data as customers appear on the screen. My server returns me a json with a…
-
4
votes2
answers193
viewsJsonobject with multiple values without using Array
Goal Create a JSON with the following structure: { "auth": { "user": "rbz", "token": "abc123" } } Setting Creating the root structure: JSONObject JOraiz = new JSONObject(); Creating the values user…
-
4
votes3
answers715
viewsRead JSON array on Android
I’m having trouble reading a JSON in the format: [{"RESULTADO":"SUCESSO"}] Webclient.java: //PARA LER UM JSON, USAMOS A Scanner Scanner scanner = new Scanner (connection.getInputStream()); String…
-
4
votes1
answer661
viewsHow to map json entities?
I wanted to know if there is any way to map json objects in React-Native. For example, let’s say I get the following json: { "data": { "lastUpdate": { "name": "Lala" } "dob": "01/01/2001" } } and I…
-
4
votes1
answer1967
viewsHow to take data from a JSON with Python
I’m taking data from a JSON. Only I’m having a problem. { "atividade_principal":[ { "text":"Atividades de televisão aberta", "code":"60.21-7-00" } ], "data_situacao":"03/11/2005", "nome":"GLOBO…
-
4
votes3
answers146
viewswrite json sentences html
I tried to make a mini database in JSON: [ { "titulo": "Exemplo", "localizacao": "Rua de Exemplo", "texto": "Texto grande de exemplo para usar como teste" } ] Then I created a general variable for…
-
4
votes2
answers318
viewsSum values from different JSON indices
I have an API that a chunk of it returns the following array, and for each index has an object slas that brings all carriers: [ { "itemIndex": 0, "selectedSla": "Expressa",…
-
4
votes1
answer42
viewsTable does not add last request
Good morning guys, I’ll get straight to the point... I have this Success from my json where validating the following function: for(i=0; data.length>i ;i++) { let cliente = data[i].item; let…
-
4
votes1
answer598
viewsConcatenate content from a String Array (JSON) generating a sentence
I’m trying to join the contents of an array of strings into one sentence, but I can only bring the whole content separated by commas. Detail, this array comes from a JSON file that is consumed by…
-
4
votes4
answers200
viewsFind character succeeded by another character using Regex
I am trying to assemble a regular expression that can identify and correct an invalid JSON. What I am trying to do specifically is the following, using as an example the following JSON: { "array":…
-
4
votes1
answer91
viewsError reading Jsonobject inside an array
I have the following JSON: { "setor":6, "tipo":"S", "filial":1, "peso":0, "doca":1, "operacao":1, "usuario":1, "empresa":1, "movimento":23, "local":4, "ativos":[ "{\"ativo\":1,\"quantidade\":25}",…