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
-
82
votes5
answers86551
viewsUpload a file with AJAX
I wonder if there is any simple way to upload files via AJAX + JSON. If there is, what would it be?
-
51
votes1
answer7183
viewsWhat is it and what is JWT for?
I saw in some comment here on the site, in some question, talking about JWT to solve an authentication problem. I had seen the term vaguely before and I thought it was something from Java (hehehe).…
-
51
votes2
answers1072
viewsIs it possible to process data receipt in Camel Casing using Odata?
In the method Register class WebApiConfig i have configured a CamelCasePropertyNamesContractResolver public static void Register(HttpConfiguration config) { //Resto do código removido para brevidade…
-
45
votes4
answers26195
viewsWhat is a payload?
I’ve always seen in some frameworks that work with REST or with sending data in JSON format in a request using the expression payload. What does that name mean in HTTP requests? What is specifically…
-
27
votes6
answers47964
viewsWhat is JSON? What is it for and how does it work?
I usually come across this JSON, but I don’t know what it’s for and how it works.
-
23
votes4
answers3497
viewsCapture the values of JSON that is Online
My problem: I need to read a JSON that is in a certain URL. I tried the following code, but it doesn’t work: JSONObject jsonObjeto; JSONParser parser = new JSONParser(); URL url = new…
-
21
votes1
answer23926
viewsIs there an API that lists states and cities?
I’ve been searching for some json API that lists the states of a particular country, or cities of a particular state, I’ve searched for this feature for several Google Maps Apis but I couldn’t find…
-
21
votes2
answers4047
viewsWhat are the main differences between JSON and BSON formats?
I’ve been reading an article on Internet, where they commented on the format BSON(Json Binário), but I was left with some doubts about: What is the BSON? For what reasons he was created? There is a…
-
20
votes4
answers19183
viewsIs it possible to comment on a JSON file?
Can I comment on a JSON file? If so, how?
jsonasked 9 years, 6 months ago Paulo Costa 3,976 -
19
votes7
answers25439
viewsHow to convert a JSON response to a C#object?
I’m making a request and getting a JSON like this: { "id": "1000000000000000", "name": "BrunoLM", "first_name": "Bruno", "last_name": "X", "link": "http://stackoverflow.com/users/340760/brunolm",…
-
18
votes4
answers8116
viewsWhy and when to use XML instead of JSON?
JSON has at least two advantages over XML: The Parsing is faster Occupies less bytes Still there are people who prefer XML. Is there any reason to prefer XML? Or in what situations it is most…
-
17
votes2
answers3144
viewsIs there a REST specification for uploading files?
I’ve been having second thoughts about it for almost a month. In certain to my application, the user can upload to a file library. This upload needs to be recorded in a table called midias, where,…
-
16
votes3
answers8395
viewsDeserialize JSON Array in an Object Array
Good afternoon, I decided to ask because I’ve been holding on to this for three days and as much as I’ve looked, I haven’t found a solution to my problem. Access a Web Service via C#, Httpclient,…
-
14
votes1
answer489
viewsHow to link models (with Association), Forms, and grids in Extjs 4?
I’m using Extjs 4.2 in a project and I’m having problems involving model Associations and how to link them to Forms and grids. Let me illustrate with an example. I have 3 classes and 1 json, as…
-
14
votes3
answers30488
viewsWhat is the difference between "{ }" and "[ ]" brackets?
The JSON file format uses two types of symbols to organize the data in its structure, they are: Square brackets: [ ] Keys: { } In them it is possible to insert values of several types, see this…
-
14
votes3
answers353
viewsIs it possible to prevent one of the attributes of an object from being serialized in Javascript?
Is there any way to prevent one of the attributes of an object from being serialized? Take as an example the object below. If I do not want propriedade2 be serialized, how could I implement this?…
-
13
votes3
answers48813
viewsReceive external JSON data from PHP
I am trying to receive an external JSON file via PHP. I am doing so: <?php $json_file = file_get_contents( "http://www.moonwalk.com.br/api/VitrineDeProdutos/58e903df295cbc5c4639434d4c35090d");…
-
13
votes3
answers6699
viewsConversion of JSON string to Java object
I am trying to convert a JSON string into a Java object used by Gson. This is the json I get from the webservice: {"concurso": { "numero":1499, "data_sorteio":"01\/06\/2013",…
-
12
votes1
answer3813
viewsWhat is the "application/Ld+json" type for in a <script> tag?
I was looking at the source code of the Kickass page and this excerpt caught my eye: <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url":…
-
12
votes1
answer4323
viewsWhat is the purpose of the JSON column in MYSQL?
I realized that Mysql has released a new feature, which is the column can have the type JSON (which can even be saved in binary, as I was reading). Documentation: As of Mysql 5.7.8, Mysql Supports a…
-
11
votes1
answer789
viewsDownload text from a textarea as a server-side language-free file
I need the user to click a button to download the text that is within of textarea as a JSON file, for example: User click on button lower -> Start downloading the file textarea.json An example…
-
11
votes1
answer1783
views -
11
votes2
answers277
viewsHow do I use the jsondiffpatch library?
I’m having doubts about how to manipulate the data with the library jsondiffpatch The array original: [ {"id":1004,"idproduto":3,"forma":"Alface","preco":1,"quantidade":1},…
-
11
votes3
answers5878
viewsCreating a List<> from a Json C#
I have a doubt regarding JSON, I have the following JSON: { "jsonrpc":"2.0", "result":{ "nr":26, "lista":[ { "codigo":"2", "nome":"Pratos Quentes", "foto":"./images/cupcake.png" }, { "codigo":"3",…
-
10
votes5
answers2222
viewsWhich libraries to develop a Restful API in JAVA?
I’m a beginner in java and would like to create a RESTFUL API but I don’t know which library to use or how to use it. Can someone refer me good tutorials or some libraries for study. I would like to…
-
10
votes2
answers424
viewsDeserialize Json in which the key is a number
I’m trying to deserialize Json with C#, but I found a problem. In Json you can use numbers in the names of "keys" (keys), but we can’t use numbers in property names in C# Example: Json: "c":[ {…
-
9
votes7
answers16282
viewsUnderstanding the JSON file
I have a code similar to this on Jsfiddle. On my home WAMP server I did to try working with JSON (Jsfiddle does not contain the JSON file to test). In a question I asked about how to insert data…
-
9
votes2
answers29287
viewsTake JSON data array and print with jQuery
I have a JSON in the following format: { "representantes": [ { "nome": "Foo LTDA", "endereco": "Alameda dos Anjos", "cep": "12345-000", "telefone": "(11) 1234-1234", "site": "www.foo.com.br",…
-
9
votes3
answers10114
viewsWhich JSON structure to use for large data volume without loss of performance?
I am thinking about using JSON in a project, because it is highly accepted and there are many libraries ready that encode and decode it in other objects (arrays, for example), but there is something…
-
9
votes5
answers4393
viewsTransforming a JSON information into a variable
I am calling a function in Node.js and it returns a JSON: { "pair": "BTCBRL", "last": 2280.0, "high": 2306.0, "low": 2205.0, "vol": 113.17267938, "vol_brl": 255658.20705113, "buy": 2263.0, "sell":…
-
9
votes2
answers5337
viewsHow to filter data from a JSON with JS?
Guys, wanted to know how to make a "select" inside a JSON file using JS. Example: I have a table below using data coming from a JSON file, but I wanted to make a filter so when click search, it drop…
-
9
votes4
answers1959
viewsReceive json data in PHP
I’m having trouble receiving JSON data in PHP to save to the database, and this data is sent from a python script, have tried the json_decode using the variable $_REQUEST, but unsuccessfully, when I…
-
9
votes7
answers65838
viewsHow to run a C program in Visual Studio Code
I’m trying to run a code (program) in C in Visual Studio Code, but I can’t find the necessary settings. I installed the C/C++ extension (Microsoft) Project structure: .vscode - c_cpp_properties.json…
-
9
votes1
answer3563
viewsWhat is the maximum size of a JSON file?
I will give an example to explain my doubt: I need to recover information from images coming from an API, this image bank returns JSON’s with information of the images I need, in all there are 33…
-
8
votes4
answers2543
viewsInsert paragraphs from a JSON file into a DIV
I have a file json that in its contents it contains paragraphs. These paragraphs are separated by \n but when I insert the content the paragraphs are not separated and instead of line break I have a…
-
8
votes2
answers1442
viewsHTTP requests in C++
How could I make a request in a URL that would return a json in C++? I need to access a /Return.php URL that returns the string {"status":true,"hash":"12#87!!3@WSS\/.","user":"admin"} and work on it…
-
8
votes1
answer323
viewsschema.org: What to use: Microdata or JSON-LD?
The marking of structured data Schema.org for search engines Google, Yahoo! , Bing and Yandex is great for rich snippets. However I realized that most webmasters use Microdata and almost never use…
jsonasked 9 years, 11 months ago Ennio Sousa 686 -
8
votes2
answers1720
viewsWhich is faster, access data in file or database?
In terms of performance which method is fastest to recover data, 1) read a file (which will be generated only once with PHP) or 2) take this data from a database? This data will always be shown on…
-
8
votes2
answers9392
viewsSerialize object list for JSON: A circular Reference was Detected while serializing an Object of type
I’m trying to Serialize a list of objects to Json and have received the following error: An Exception of type 'System.Invalidoperationexception' occurred in Microsoft.Web.Extensions.dll but was not…
-
8
votes6
answers20421
viewsHow to get weather and weather information?
I came across a problem I’d like to see if it can be solved similar to the post office. When you have a zip code you can rescue from a web service other data, such as the address and city of that…
-
8
votes3
answers7156
viewsgenerate a json file with java
Iterative insertion: 7841910ns - 7ms Iterative selection: 2677762ns - 2ms Iterative merge: 708154ns - 0ms This algorithm was made in Java, in the java console is printed several values, being: name…
-
8
votes2
answers7119
viewsHow popular a Dropdownlist from another Dropdownlist
I need to know how to popular a Dropdownlist from another Dropdownlist. Example: I have a Dropdownlist called Project that takes information from my DB. When I select for example "Project 1" I need…
-
8
votes2
answers1864
viewsSerialize Object to JSON
How do I convert an object to JSON? I even found some codes on the internet that even worked, but my object has some fields that are other objects and so the conversion did not reach the last level.…
-
8
votes2
answers713
viewsDynamic grouping of JSON data
I have been trying for a few days to perform JSON data grouping dynamically, but without success, it is a matter of logic rather than programming itself. Given an array of objects(Users), group them…
-
7
votes2
answers338
viewsJSON performance to power an entire website
Adapting a Drupal theme to pure HTML with a tight schedule as expected, the code came out a little more complicated than I’d like. In this way, I had the opportunity to explore JSON and some of its…
-
7
votes2
answers1160
viewsHow to develop a private Restfull API?
I need to develop a Restfull HTTP API in PHP to serve as authentication for users of an Android application, the problem is that as it is a public distribution application I can not define any key…
-
7
votes1
answer4635
viewsHow to recover query result variables via Ajax in PHP?
I made an appointment via Ajax that returned me the variables within the PHP: // Variaveis $nome = $Fetchi['nome']; $email = $Fetchi['email']; $tipo = $Fetchi['tipo']; $senha = "Digite uma nova…
-
7
votes1
answer11081
viewsRemove duplicate elements in Array
I’m getting an array by JSON, and using the array_unique to remove duplicated values, however, is displaying the following error: <b>Notice</b>: Array to string conversion in…
-
7
votes2
answers2040
viewsHow to store the value of the indexes of this JSON in variable?
I have a function in php that returns it to me. [{"id":81,"username":"usuarioteste23"}] How can I save in a variable this ID and in another variable this Username? Thank you.…
-
7
votes5
answers26037
viewsAccentuation in the JSON
I have accentuation problems when printing JSON. If I use characters like ã, õ, ô, ç, some codes appear. I do not know if it influences, but the column is with Collation "utf8_general_ci". php…