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
-
2
votes1
answer414
viewsHow to filter JSON data using PHP?
I need to pull the leaderboard of football: position, coat of arms, team name, points, games, wins, goal balance. I’m pulling from an API, see the PHP code I tried: <?php header("Content-Type:…
-
2
votes1
answer681
viewsDifferences between using XML or JSON
I want to understand why use XML or JSON, and why have little XML content on the internet? XML is already "dead"?
-
2
votes1
answer692
viewshow to read the content of a json by VUE
I need to receive a file json for input type file and read the contents of this file on the front without having to make a request to the server. <input type="file" id="file" ref="file"…
-
2
votes1
answer583
viewsHow to refresh on another page after entering data in the database
i am creating a service system where there is a screen only to display the passwords that are being registered in the database. The problem is that I can’t update the passwords in real time, because…
-
2
votes1
answer244
viewsReading JSON returns empty
I am reading a JSON from a URL, as code below: $link1 = file_get_contents('http://gwmestampas.com.br/arquivo.json'); $obj = json_decode($link1); echo $obj->event; echo $obj["event"]; foreach($obj…
-
2
votes2
answers239
viewsConsume JSON data from Mysql PHP flock
I created in my MYSQL 3 fields ID, Cliente, Produtos where they are registered via JSON the information of Cliente and the produtos that he selected. JSON Client { "nomecliente":"Cristiano",…
-
2
votes1
answer899
viewsLaravel - Test script errors to return certain status to AJAX
In an application in Laravel I have several scripts using ajax. Everyone expects a response from the controller script and, if it returns true, I run a certain function with the 'Success' ajax…
-
2
votes1
answer229
viewsHow do I use a variable instead of the Array key?
I’m new to JSON manipulation. have an Array: let json = [ { "id": 111111, "name": "nome1" },{ "id": 222222, "name": "nome2" } ] How do I pass the key name as a function parameter? Example: teste =…
-
2
votes2
answers412
viewsgraphic with data from a REST service
I have a REST service done in PHP and this returns me data in JSON. When consuming the API url in REST, I need to display the data in javascript-based graphics. Does anyone know of a JS framework…
-
2
votes2
answers756
viewsCatch JSON after submitting a POST
I’m having trouble getting the answer I have after sending a request via POST function httpPost($url, $data) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl,…
-
2
votes1
answer2757
viewsRead JSON and print to html with Angularjs
I am trying to print the data of a JSON file in html using Angularjs, running everything through XAMPP and in my htdocs/test folder there are 3 files (index.html, main.js, test.json). The console…
-
2
votes3
answers3043
viewsAssign $.ajax received value to variable
It is possible to associate a value received by $.ajax a global variable, because from these values, I need to add them and show them in another table. I tried but always interprets with local…
-
2
votes2
answers367
viewsASP - Printing JSON without last comma and double quotation marks
I need to make a query in the database, and returns a JSON. I tried using JSON for ASP from Google, but there were some errors, so I decided to do it manually: <!--#include…
-
2
votes1
answer96
viewsInsert an array into a Key Json
I need to get a Json as follows: { "razao_social": "Loja do Zé LTDA", "nome_fantasia": "Zé Store", "tipo": "J", "observacao": "Cliente com ótimo histórico de pagamentos.", "emails": [ { "email":…
-
2
votes3
answers84
viewsAccess values from a python json
I have the following python code import requests import json data = requests.get('https://proxycheck.io/v2/42.131.121.100?vpn=1&asn=1') print(data.text) That will return: { "status": "ok",…
-
2
votes2
answers2570
viewsHow to place two Google Graphics Maps on the same page
I’m creating a web application that uses two charts powered by the bank. I use the Google Api, google Charts. However, only the first graphic appears while the other is blank. <html>…
-
2
votes2
answers1182
viewsUpload Json to Google Maps
I am drawing a Poligono on the google map, I managed, but as it is big it got a very repetitive code that I would like to isolate in one . json but could not. I tried to do something simple with…
-
2
votes1
answer58
viewsHow to catch a json object with match
Good morning, I have a json with the following format: { "code_name_1001": "Antônio", "code_name_1002": "Luis", "code_name_1003": "Alice", "code_name_1004": "Julia" } my doubt is on how I can get…
-
2
votes1
answer127
viewsLike reading a JSON on Harbour?
In PHP, to interpret a JSON file for the language, we can use the function json_decode. Already in Javascript, we can use JSON.parse. What about Harbour? Is there a role to interpret JSON? Example:…
-
2
votes1
answer312
viewsDoubt when returning string json to Fullcalendar event
I have a question. I’m using Fullcalendar on a project. I can display the data registered in the database normally. My problem is in the eventClick: did so: var date = new Date(); var d =…
-
2
votes1
answer234
viewsAndroid json utf8
Good afternoon! I have a class that imports data json, but some characters are not recognized, I have to apply utf8 to them, but I’m not getting, below the function that matters the data. public…
-
2
votes1
answer439
viewsWrite Json Return to txt c#
I am trying to record a return of a JSON in a txt file. But when I try to use DeserializeObject makes a mistake. I have the Json below (example of 2 records): [ { "TipoVeiculo": "Caminhão",…
-
2
votes1
answer11955
viewsJSON return with special characters in URL
I’m having a problem with the return of a JSON, I made a query to fetch some images from the database, some URL users registered the images with special characters like -> (ç ã) the texts that…
-
2
votes1
answer434
viewsError with duplicate values in Angularjs
I have a problem of duplicate values in Angularjs, in my JSON will always have repeated categories, in ng-repeat I used the track by $index but the error persisted. The code of my controller:…
-
2
votes2
answers1044
viewsProblem with toFixed in return Json
I’m having trouble using toFixed in a return json. A part of the code success: function (dados){ $.each(dados, function(index){ var guidPedido = dados[index].guid; var statusPedido =…
-
2
votes2
answers66
viewsSWIFT - How to feed a Tableview with information from a Nsarray?
var nomes:NSArray = [] override func viewDidLoad() { super.viewDidLoad() Alamofire.request(.GET, MyUrl,parameters: nil,encoding: .JSON).response { (_, _, data, error) in self.nomes = try!…
-
2
votes1
answer1203
viewsTreat Post return in Javascript
Opa, I have a page that runs a Setinterval of seconds in javascript, this page captures the data of Divs and sends via post, and this data sent is not fixed, sometimes, can be sent 1 or more of a.…
-
2
votes4
answers1194
viewsContents of a JSON in a table cell
How do I get the result of a json and play directly inside a td of my table? It’s right in the form of getJSON? <script type = "text/javascript" language = "javascript">…
-
2
votes1
answer395
viewsHow to access json?
I think the simplest thing is to access a key and a value in json, but for weeks I haven’t been able to do it... it returns the correct json through ajax but when I try to access it from. Note: I am…
-
2
votes1
answer154
viewsJSON conversions
I’m a beginner in C# and ASP.NET, and I’m having doubts about JSON and dictionaries I have a serialized Dictionary that was stored in the database with: var json = new…
-
2
votes2
answers64
viewsUse JSON in Jquery library
I’m using the "Vegas Background Slideshow" library in a project with the following code: <script> $("#main").vegas({ slides: [ { src: "assets/site/img/uploads/banners/01.jpg" }, { src:…
-
2
votes1
answer853
viewsViewing current month birthday in Fullcalendar
I have a database with a date in the field start, would like to display only the current month’s birthday fullcalendar, but I’m having two difficulties: select only the current month birthday show…
-
2
votes1
answer96
viewsList errors returned in an ajax request
I have a Controller that is returning errors this way: return response()->json(['erros' => $this->renderHttpException($e)]); I am receiving this json as a response to the ajax request:…
-
2
votes1
answer809
viewsAndroid: sending and receiving json with php and registering in the database
I’m having trouble making this communication, being that I am responsible for the php part and the android part is being made by a friend(that the code sending something), he said he is sending by…
-
2
votes1
answer709
viewsTake items from the JSON array
Guys, I am working with youtube api and a query returns me the json below. How do I pick and print each item separately? For example I want to print each "videoId". How do I? { "kind":…
-
2
votes3
answers4951
viewsJson PHP and Mysql
I am working in a personal project with an open database, and I need a JSON file from a MYSQL query, I am a few days trying to solve this problem and I am very difficult, because I can not get the…
-
2
votes1
answer1771
viewsObject with list of objects within Javascript
I am using angular to make a form that contains multiple checkboxs (using angular-material), this form sends the values to the controler, which are received as follows: I need to take this data (all…
-
2
votes3
answers950
viewsLocal communication through online application
I am developing a system for ordering a snack/pizza shop. Let’s assume that the waiter makes the order with the Tablet (Android) at the customer’s desk or the customer goes and makes the request at…
-
2
votes1
answer693
viewsHow to read a JSON from a second link of an API?
Speak guys, trying to get JSON, a second link that is provided by the API. But it gives error. Follows the code: private static String URL =…
-
2
votes1
answer97
viewsProblem with function when trying to perform deletion
I’m having a problem making the deletion attempt and I get an error message on the console, my script is like this: <form action="" id="frmDeleta" class="smart-form"> <button type="submit"…
-
2
votes2
answers1489
viewsHow to execute one code only after finishing another?
I need to run the search for cities only after I finish loading the states within select and capturing the ID. I’m taking this ID to send another Ajax that will popular the cities of this state…
-
2
votes2
answers449
views -
2
votes2
answers1377
viewsHow, after a POST request, to receive JSON feedback on C#?
I need that after making a requisition POST http, I also receive the json return that is in the echo of php. This is the test code on php <?php if(isset($_POST['request'])) { echo $jsonret =…
-
2
votes1
answer127
viewsHow to pass a JSON Object to a method in the webservice?
I’m trying to pass a JSON Object to a method in my controller and I’m not getting it, the problem is that the email field always returns null. How to do this ? I’m trying like this. JSON Object…
-
2
votes2
answers247
viewshow to parse a json return with complex object
How do I parse a return json where I have optional fields, such as phone, the user can have more than one as residential, mobile and phone to message, in this case if the user informed the phone he…
-
2
votes2
answers646
viewsEncoding problem Servlet, json and jquery.ajax
I created a Servlet q returns a simple JSON. I was able to consume it quietly, but by putting the content in a div was as follows: 0: �gua 1: a�ucar 2: sal 3: canela 4: �leo Looking at the return of…
-
2
votes2
answers1528
viewsFilter c/ AJAX + PHP
Within my system, the user logs in, some information searched in my database is shown, follows function that searches the data and how they are listed: Function # função que busca os dados de…
-
2
votes1
answer40
viewsError searching blogger information via json
I’m trying to get information from the blogger via json and put to appear in a recyclerview. But I’m not getting it. I’m a beginner in programming, so I’m unharmed if you have to sign any key so you…
-
2
votes1
answer488
viewsGrab some elements from a JSON variable
I have a Javascript variable that stores a JSON, similar to this one: { "estado": [ { "nome": "Foo LTDA", "endereco": "Endereço de SP", "cep": "12345-000", "telefone": "(11) 1234-1234", "site":…
-
2
votes1
answer756
viewsReact.js Error trying to access nested Json data via component state
I’m starting with React.js and am having trouble accessing data nested in a JSON. I’m using the whatwg-fetch to make the request and it’s working, but I can’t access the nested JSON data, example:…