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
-
5
votes1
answer4479
viewsPortuguese dictionary online for performing requests
I am looking for an online dictionary in Portuguese that allows me to do requests as the example: http://www.exemplo-dicionario.com/dicionario?palavra=palavra-pretendida And answer the definition of…
-
5
votes3
answers1018
viewsSerialize XML for REST API with Correct Accent
I am creating a small read-only REST API service on a client system. It uses Spring MVC to fulfill the requests and the purpose of each request is to return a JSON with certain information to…
-
5
votes1
answer1854
viewsHow to run a javascript function from a json file
I have a json file that is generated by php and it looks like this: { "status":200, "command":"faca algo", "action":"function (){document.write('quer que eu faça algo?');}", "type":"acao" } how to…
-
5
votes1
answer147
viewsHow ajax does to identify classes
I have the following application: function atualizarPrdutos(categoria){ $.ajax({ type: "POST", url: "teste.aspx/InsertData", data: JSON.stringify({categoria:categoria }), contentType:…
-
5
votes2
answers1450
viewsSend Model Razor with $Ajax Serialized Controller
I’m trying to send an object to controller, using ajax. The object goes to the controller with Json, but recognizes only the values of get, not post. $.ajax({ type: "POST", url:…
-
5
votes2
answers160
viewsHow do these sites load your HTML?
I ended up looking at source code from sites like Gmail.com and Secret.ly and noticed that HTML is embedded in Javascript, what is this technology that they use? Stay this way: <script>var…
-
5
votes2
answers1076
viewsIdentify extension installed in google Chrome
How can I identify that the Google Chrome of the user who is accessing my site has a certain extension installed. For example, one has the extension of Glogo.com/Itau, etc.. I need to check this to…
-
5
votes2
answers579
viewsPull PHP information via AJAX with jQuery in json format
I have a code in jQuery that performs the creation of a calendar that you can leave reminders on the date. The code is as follows: var calendar = $('#calendar').fullCalendar({ slotDuration:…
-
5
votes2
answers4683
viewsAJAX post request with Angularjs
Hello, I wanted to know how I make a requisition POST for a url with Angularjs and also wanted to know how I transform a normal javascript object for a json, to send in this request.…
-
5
votes1
answer504
viewsAjax Locking Page Exchange (Longpolling)
I am trying to complete a connection using Long Polling, where the browser sends a request to the server and awaits a response. To avoid this door being open endlessly, I created a routine so that…
-
5
votes1
answer11223
viewsBlocked cross-origin request
I am using an Elsevier API to fetch a book listing. To do this, I am using an example of them present at this link: http://apihtmlgen.elasticbeanstalk.com/sd_search.html I made my registration, I…
-
5
votes1
answer10995
viewsHow to read a json file using Delphi
Good not being a pro in delphi want to read a file json and extract fields. http://www.nif.pt/? json=1&q=509442013…
-
5
votes1
answer4267
viewsConvert JSON to Array in Javascript
Good afternoon, it’s my first question here. I’m getting the json below through an ajax request. [ {"SEMANA":1.0,"PRODUCAO":0.0,"PRODUCAO2":0.0},…
-
5
votes1
answer4311
viewsDynamic search with JSON - PHP - MYSQL
I’ve been looking on the internet but I couldn’t find any references, maybe because I was searching wrong, so I resorted to create this post. I have a query in the database (Mysql with PHP) that…
-
5
votes1
answer1033
viewsHow to consume a JSON url without using jQuery
How could I consume a URL with data coming from a JSON without using libraries like jQuery or something like that for a structure like: [{chave:valor1},{chave:valor2}]
-
5
votes2
answers1104
viewsFile Upload Multiple via ajax - PHP
I am trying to upload files via ajax and PHP with the following codes below and it is not working. I can’t identify what I’m doing wrong. Page <div id="bsUpload"> <form action=""…
-
5
votes1
answer983
viewsAlgorithm - How to catch days in a JS week
I have the following situation: I need to set the days of each week within a month, creating an array of JSON objects. Each position would correspond to a week, for example if there were 5 weeks I…
-
5
votes1
answer353
viewsHow to deserialize a list with items of type { "key": "value" }?
I need to deserialize a JSON, but I can’t map the enumerated object. Follows the JSON: { "list": [ { "1": "Bola" }, { "2": "Quadrado" }, { "3": "Retangulo" } ], "code": 0, "success": true } My…
-
5
votes2
answers543
viewsHow to organize the return of data in a List<T>?
I have a wcf that returns me some information, I would like to bring them organized, how could I do it? I’d like to return data like this: At the moment it’s like this: I’m doing like this: public…
-
5
votes1
answer2239
viewsLoad table with json using Datatables
I am using jquery Datatables plugin version 1.10.7. I am trying to load a table following the following structure: JSON { "d:" [ { "IdNotificacao":null, "Contrato":{ "id":631, "serie":2210618,…
jsonasked 9 years, 5 months ago Diego Moreno 491 -
5
votes1
answer182
viewsJsonexception being launched in Twitter search - Java
I have an algorithm that does a search of old tweets on Twitter. The application worked normally for a few days, but out of nowhere it started to throw an exception. Code: public static…
-
5
votes2
answers4213
viewsConvert hour format in seconds
I have a value displayed by a json: "tempoShoutcast":"03:11:48" How can I turn this format into seconds?
-
5
votes2
answers4702
viewsDoubt about json_encode and json_decode
When and how we should use json_encode and json_decode? What are they for?
-
5
votes1
answer147
viewsGson to Java - Map
I need to pass these values from a json file to a java class file, the Json file is of this type: { "id":1, "name":"Gold", "description":"Shiny!", "spriteId":1, "consumable":true, "effectsId":[1] },…
-
5
votes1
answer13456
viewsHow to go through attributes of a JSON?
I’m trying to go through attributes of a json, I’m trying this way for (var i = 0, length = r.length; i < length; i++) { for (var i2 = 0,length = r[i].lenght; i2 < length; i2++ ){…
-
5
votes2
answers2664
viewsManipulate and model Json object
I have a JSON object with the following structure: [{ "Codigo": 7, "Descricao": "Atividade 1", "CodigoMilestone": 6, "TempoRevisado": 2, "Inicio": "\/Date(1445738400000)\/", "InicioCedo":…
-
5
votes2
answers1792
viewsJson output with json_encode()
json_encode() - Returns the JSON representation of a value If I do: $foo = array('a', 'b', 'c', 'd', 'e'); echo json_encode($foo); I’ll get: ["a","b","c","d","e"] So far so good, I’m taking an array…
-
5
votes1
answer354
viewsJSON output in a table
Good afternoon, And I put a search field, and as soon as the search is done, I popular a table with the users found.. The part of the query I managed to do, but now I’m not getting popular(actually…
-
5
votes2
answers1590
viewsHow to save files to a server via Java?
I need to save a file to a server using Java. In my case, I need to save a file json. I can save a file normally on my computer, but how do I save directly to a remote server? Below is an example…
-
5
votes3
answers129
viewsWhy are Javascript objects not always JSON?
For example: { "nome": "Meu nome", "sobrenome": "Meu sobrenome" } Can it be considered an Object and also a Json? If not, why not? What will differentiate one from the other is when instantiating?…
-
5
votes2
answers5954
viewsWhat is the difference between using toString() and JSON.stringify()?
var arr = [1,2,3]; arr.toString(); // "1,2,3" JSON.stringify(arr); // "[1,2,3]"
-
5
votes2
answers197
viewsGet JSON from the URL properly
I have the following method that gives me one String: public static final String jsonClientes = " {\"clientes\": " + " [" + " { \"idClientesT\": 1," + " \"tipo\":\"s\"," + " \"nome\":\"Carlos\"" + "…
-
5
votes3
answers296
viewsFunction that converts this string to a json
I have a string in the following format: "a=123 b="ABC" c="Olá Mundo!"" need to create a function that transforms this string in this json: { a : 123, b : "ABC", c : "Olá Mundo!" } I think it has a…
-
5
votes2
answers474
viewsValidation without "Modelstate.isValid"
I have the following scenario: [HttpPost] public PartialViewResult Create(string dados) { var clienteViewModel = DeserializeJson<ClienteViewModel>(dados); if (ModelState.IsValid) { } // Não…
-
5
votes1
answer739
viewsDeserialization of Object JSON morMot
I am trying to deserialize a JSON Object with an objectlist, following the example of the forum mormot does not work, someone can help me: Memo.Text :=…
-
5
votes1
answer28
viewsI cannot return another field other than the primary key using $project
I’m starting in Mongodb and would like to perform a consultation in my database of type: Which animals got sick in the year 2016? Using $group and $project: db.animais.aggregate([ {$unwind :…
-
5
votes3
answers1793
views -
5
votes2
answers459
viewsRepresent relationships in json
What is the right way or best practice to represent the relationships of a json resource? As an example, I have tables contrato, representante and empresa and relationships contract N:1…
jsonasked 7 years, 8 months ago Fernando Zabin 707 -
5
votes2
answers1163
viewsSecurity Application Angular
I have questions about safety, I will exemplify : In my front, in my controller have that method: $scope.getAllpessoaGrid = function (strPesquisa, tipopessoa) { $scope.progressbar.start();…
-
5
votes1
answer3741
viewsHow do I convert formdata to json?
I have the following code: var form = new FormData(); form.append('user',$("#user").val()); form.append('password',$("#password").val()); var data = JSON.stringify($(form).serialize()); but var…
-
5
votes2
answers895
viewsHow to display in the browser and in a friendly way information from a JSON file?
The application receives a JSON file, already validated, and must display it to the user who is a programmer. I would like to display JSON as on this validation and beautify site JSON. So I wanted…
-
5
votes1
answer725
viewsVuejs: how to create a condition from one v-for to another
My problem is the following, I have two separate options boxes, where the list of the first box is loaded through a json. And I need to load the second box of options depending on the value selected…
-
5
votes2
answers35879
viewsNo 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'null' is therefore not allowed access. - Phonegap
I’ve been reading about this json method and I just don’t understand and don’t know what to fix, I’m using another domain to get the json. Here is my code: $(function(){ var url =…
-
5
votes2
answers1584
viewsHow to avoid infinite recursion without using the Jsonignore annotation in Springboot
I have a relationship @OneToMany amid Produto and TipoProduto where a TipoProduto may have several Produtos and a Produto may have only one TipoProduto. I’d like to list all the Produtos of a…
-
5
votes2
answers1048
viewsForeach PHP JSON json_decode How to print sub array
Good morning folks! My question is this. I created a foreach to access the data below an API $token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $headers = array('Authorization: Token ' . $token); $ch_subs =…
-
5
votes1
answer87
viewsHow to get a list from a JSON
I am trying to make a list of currencies from a JSON text, for this I am using the API "exchangeratesapi.io". Using Javascript I achieved some success: const url =…
-
5
votes4
answers1546
viewsTake specific value from a JSON or XML
Hello, I have an entire JSON inside a string and I need to turn it into an object in order to access some data... I’ll leave the code below to see if you can help me. My JSON is in that string:…
-
5
votes4
answers823
viewsTransform String Array into Object Array
I got the following Array string: ["TagFuncao:CN Evento:TODOS", "TagFuncao:DOC.AGRO.INDUS Evento:TODOS"] I need to transform this Array into an Object Array where TagFuncao and Evento is property of…
-
5
votes3
answers204
viewsHow to serialize and deserialize objects containing Bigint values in Javascript?
Let’s adopt any example code that contains a type value Bigint: const params = { largeNum: 54740991n } If I try to serialize you with JSON.stringify an error is returned: const params = { largeNum:…
-
4
votes1
answer1407
viewsHow to return via PHP several JSON messages, each of which is fired at different times?
I am building a system and at a certain stage it saves 3 sets of information filled in the form by the system operator: Set 1: student information; Set 2: student guarantor information; Set 3:…