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
answer1055
viewsAlphabetizing an object array
I have an array of objects and want to put in alphabetical order but I’m not getting by javascript, I’ll put as the array is structured and the code to call on the page var json = [ { "ID":"1",…
-
0
votes2
answers149
viewsJquery - Multi-line Viacep autocomplete
I’m using Viacep’s Webservice to do the street autocomplete on my registration form, but it’s a form where 20 lines, each line contains: ZIP CODE + STREET OF THE CONDOMINIUM when filling the zip…
-
0
votes1
answer96
viewsCreating Energy log table for several Django models
I have 30 models. Each of them contains information from a calculator and each record is information from sub-calculators. I need to create a log table of each calculation made by the user.…
-
0
votes1
answer43
viewsTransform hexcode "+" into "+" in Javascript
I am using a payment API that requires the phone numbers reported to be in E.164 default (+[Código do país][código da cidade][numero de 8~9 dígitos]) and as a string (as in the example below).…
-
0
votes1
answer320
viewsHow to check if an id exists on the page
made a Javascript that generates several cards each of them with an id, to avoid creating repeat cards I put an if before the generation of cards to check if it already exists, but it did not work:…
-
0
votes1
answer544
viewsHow to send information from a Javascript site to the NODE.js server
Guys, I have a javascript site where I get information from a Rest API (json) i would like to delete this information to my server (A Node.js that I created that connects to the database) is my…
-
0
votes1
answer76
viewsLoad a json into a Yii2 Dropdownlist
I recently migrated to the YII 2 framework. And I have a small question: I have a json that I need to popular a Dropdownlist. The Json file: [ {"codigo": "05", "descricao" : "Administrador"},…
-
0
votes1
answer116
viewsError deserializing a Java List Json
The following is, I get a list in JSON format. However, it seems that there is some kind of non-conformity in the way JSON is mounted. It follows the code... I have a client class that is as…
-
0
votes1
answer259
viewsHow to perform a recursive query with the relations stored in a JSON array?
I have a MYSQL table that relates to itself. The relations are represented in the same table through a JSON Array. Here is the table and some sample data: CREATE TABLE `templatedata` ( `Id`…
-
0
votes1
answer202
viewsSend integer as string in a JSON
I’m having a problem returning a very large integer value in JSON type: {“matricula”: 201737909200976697} What happens is that in return is bringing 201737909200976700. This occurs with any large…
-
0
votes1
answer66
viewsHow to validate value that comes by json from php to ajax
In php I have the following return: $invalido = (object) array( 'invalido' => true ); echo json_encode($invalido); and I need to show on success of ajax asked if the invalido is true. I tried the…
-
0
votes0
answers29
viewsShow in json a Relationship
I am making a system that there is a register of products, these products the same can be part of only one group, or not. I have this model for Products: class Products extends Model { protected…
-
0
votes2
answers95
viewsChanging an entity by passing a list
Hello, I have a registered teacher class and want to change it by passing an array of subjects. I have the following code: teacher class: //... atributos não importantes ao problema @ManyToMany…
-
0
votes0
answers684
viewsHow to remove an index from localStorage
I need to make a manipulation of localStorage and I don’t know how to remove an item from an index. I’m very beginner in the subject and I don’t know how to pass this information to the button.…
-
0
votes1
answer107
viewsMysql error: json_set does not exist
I am currently using Laravel to build some projects (personal); I have no experience in the framework, but a problem appeared, apparently due to MYSQL. I created a table called tabelateste and in…
-
0
votes1
answer1142
viewsHow to fix this Json error
I’m collecting data from an Api that retrieves the information in a Json dictionary to play on an appweb so the server gives me this error how can I fix it? Mistake you’re making: Traceback (most…
-
0
votes1
answer389
viewsWrite a Json string to the database c#
I am able to receive the data correctly, and being able to separate them correctly too, only problem is that I do not know how to use the values and be able to write in the database, could help me ?…
-
0
votes0
answers47
viewsSave query output to JSON and count results
I have a JSON with the following structure (I cannot change the JSON structure because it is used by another script): [ { "Latitude":"-22.1156051", "Status":"1", "Id":1, "Longitude":"-43.2100901",…
-
0
votes0
answers500
viewsHTTP Status 500 - Internal Server Error
After trying to make a call in the Glasfish Webservice is occurring the error below, I am trying to make a call in the Webservice Rest Json, in the XML Rest call it runs normally. package…
-
0
votes1
answer47
viewsConvert multi array to json Multi Array
Through a print_r, I am printing the array (object)$all`, and am getting the following array multidimensional: Array ( [0] => Produtos Object ( [idProduto:Produtos:private] => 1…
-
0
votes2
answers114
viewserror in reading JSON
I have a code to read Json, in my test environment it works 100%, but when I change to read another Json with other parameters it accuses Unexpected token COLON(:) at position 45. at…
-
0
votes1
answer34
viewsJSON Error with Alphabetic Index
I have 2 Arrays: Array ( [0] => Array ( [0] => Amit [1] => [email protected] ) [1] => Array ( [0] => Rahul [1] => [email protected] ) ) and Array ( [0] => Array (…
-
0
votes2
answers1395
viewsHow to pick up items from a json in c#
After almost 3 days trying to implement I did not succeed. I have the following json: { "code": 200, "data": [ { "id": 1, "type": "charge", "custom_id": "1208", "status": { "current": "new",…
-
0
votes1
answer593
viewsInserting a JSON object into a JSON field in Postgresql with Python
Good morning, everyone, I have the following problem, I made a Crawler and it receives the information, but at the time of formatting it in json format and insert in the database presents error.…
-
0
votes1
answer59
viewsAJAX request with FOR
Good staff as I can correctly print Hello World, using AJAX request, inside a for? My real question is: understand why the for executes your entire loop in the first ajax request, and only then run…
-
0
votes1
answer40
viewsCannot Rename a null token Parameter name: token
Follow the extension: public static void Rename(this JToken token, string newName) { if (token == null) throw new ArgumentNullException("token", "Cannot rename a null token"); JProperty property; if…
-
0
votes1
answer187
viewsHow to create a file-based JSON map
Hello, I have a problem that is the following I have a map with the following format and I need to create a script that converts this map to a specific JSON model in python: Map template: TELEFONIA…
-
0
votes1
answer468
viewsConvert Json to a Csharp Object
public IActionResult MoedaTurismo() { try { RestClient restClient = new RestClient(); RestRequest restRequest = new RestRequest(); restRequest.AddHeader("cache-control", "no-cache");…
-
0
votes2
answers105
viewsgetJSON with parsererror
I am trying to realize the deletion and an item for this controller send a code to view 0 or 1, but the JS function responsible for treating that return is always falling into the fail with the…
-
0
votes1
answer37
viewsGet name index json Java Android Studio
How can I get the index name of a JSON object in Java in Android Studio. Code: JSONObject jsonObject = new JSONObject(); try { jsonObject.put("nome", ""); jsonObject.put("sobrenome", "asdasd");…
-
0
votes1
answer63
viewsJson Line error 0 position 0
I have looked here on the website about this error and so far I have not found anything to solve my problem. I’m trying to use restsharp, but I’m getting an error when passing the data to . json My…
-
0
votes1
answer81
viewsJAVASCRIPT ARRAY (map and reduce)
How are you guys I have here this array: [ {dia:2,turno: turno1,M:1,T:0,N:0}, {dia:2,turno: turno2,M:0,T:2,N:0}, {dia:2,turno: turno3,M:0,T:0,N:1}, {dia:3,turno: turno1,M:122,T:0,N:0}, {dia:3,turno:…
-
0
votes2
answers259
viewsAJAX request function that returns another function for JSON object manipulation
I have a function that uses AJAX to return data from a database. The data is processed and returned in JSON and, from there, I do the proper manipulations. So: function getData() { $.ajax({ url:…
-
0
votes1
answer1386
viewsSave words with python accents
I have this json file maker: {"certa": 1, "vez": 7, "quando": 13, "tinha": 6, "seis": 7, "anos": 6, "vi": 4, "num": 4, "livro": 3, "sobre": 6, "a": 47, "floresta": 1, "virgem": 1,…
-
0
votes0
answers47
viewsgetJSON function shows no information on the screen
Good evening Guys, I really need some help. I’m dynamically setting up a table that lists an X number of calls. For this I am using AJAX to query the database and display on the page. So far so…
-
0
votes1
answer33
viewsHow to list EXC exchange information via API in PHP?
Using PHP, like listing information from the EXC API, I’m having some difficulties and who can help, Details: LINK API: Here’s an example of how I tried to do: <?php $json =…
-
0
votes1
answer145
viewsJSON to POJO returning Null
I’m making a request for the site’s API swapi and whenever I do the conversion from JSON to POJO, I get the NULL return RestTemplate restTemplate = new RestTemplate(); String fooResourceUrl =…
-
0
votes2
answers453
viewsCreating HTML with Jquery and Json
I want to take JSON’s exit from the page select.php and place each line in a <div id="estabelecimento"> with your attributes, I’m doing it this way: $.getJSON('select.php', function(data) {…
-
0
votes1
answer978
viewsSearch for data in JSON file
I need to take data in JSON, display it and do searches, for that I developed this code, but I have problem to put this data in external file. How can I put this JSON in an external file, keeping…
-
0
votes1
answer36
viewsConsuming JSON data in Javascript
I need some help with javascript. I’m trying to show in my index.html the data I’m consuming from a json. But when opening the index and waiting for the document to be loaded the items comes with…
-
0
votes1
answer95
viewsoutput.json and app-relase.apk in Android Studio and the error while installing
Hello, good morning! Every time I download an example of a project in AS, I realize that if the output.json comes along with the apk, the app will not install in any way (either in the emulator or…
-
0
votes1
answer79
viewsJSON accessing two databases
I have two darlings: SELECT Data, NomeDis, AlunID FROM FaltaDupla ORDER BY Data, NomeDis, AlunID SELECT lNum FROM Aula WHERE lDisciplina = AND lData = Derived from a Delphi function. The first is…
-
0
votes1
answer104
viewsHow can I fix this error? I want only gives <Text>{selectedValueState}</Text>
How can I fix this mistake? It occurs when I try to render the text with {selectedValueEstado}. When I do <Text>{selectedValueCidade}</Text> it’s quiet (I’m new, so I have no knowledge…
-
0
votes1
answer139
viewsHow to read a JSON with missing fields to fill in a dictionary?
In Python 3 this code reads the Federal Senate API, the proposition data: import requests import pandas as pd headers = {"Accept" : "application/json"} url =…
-
0
votes1
answer100
viewsPopular checkbox with jQuery
I need to popular the input with data coming from jQuery. I got the following input: <label> <input type="checkbox" id="turmas"/> </label> In the jQuery I have the following code:…
-
0
votes0
answers193
viewsView locations by searching for the address in the JSON file / Google Maps Api
Hello, I’m in need of doing a search in the json file, where the attributes that will return me the location would address(Street, Number, Neighborhood, City) and with this information in hand…
-
0
votes1
answer40
viewsI have an error trying to consume an API, via js fExpected BEGIN_OBJECT but was BEGIN_ARRAY
I’m trying this error because I’m picking up (from an api) a json, does anyone help me how to solve? I’m a beginner in JSF. This is my code to retrieve the data @Named @ViewScoped public class…
-
0
votes0
answers30
viewsuse Asynctask to fetch data but my Activity is slow to appear
I have a class RepositorioCidades searching data from cities using AsyncTask and returns a ArrayAdapter to the MainActivity, but when I call the MainActivity is a black screen until the data of the…
-
0
votes2
answers320
viewsPOST using Retrofit is not returning to the Onresponse function
My application is made with Kotlin Retrofit and Gson. I have several gets to fetch information and work normally, manipulate the data returning in Onresponse and ok, works normally. But when I run…
-
0
votes0
answers458
viewsError deserializing JSON (JSON array)
I looked for other topics related to this error, but I believe my case is a little different. Error: System.Exception: Error processing request: Cannot deserialize the Current JSON array (e.g.…