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
-
1
votes1
answer538
views"Uncaught Syntaxerror: Unexpected token :" error when trying to bring data in JSON format from another URL
I’m trying to pull data from a URL returning JSON to use on my page. Apparently I am able to bring the data, but for some reason I get the following error in the browser console: "Uncaught…
-
1
votes2
answers421
viewsRetrofit 2 Android objects
There’s no way I can get the valuables. The value received by JSON are these: { "status": true, "valores": { "galo": { "nome": "galinho", "valor": 300, "ultima_consulta": 1386349203, "fonte":…
-
1
votes0
answers503
viewsRequest json object always returning NULL in php
I am trying to access a server and send data/receive return in json object with php language. <?php header('content-type: application/json; charset=utf-8; Accept:application/json;…
-
1
votes1
answer32
viewsJavascript src link
Boas, I have the following code, in a function Javascript, function(){ var noDataIcon = document.createElement("img"); noDataIcon.src = "~/Images/delete_database.png"; } happened to give me error in…
-
1
votes4
answers559
viewsLoad url on same page
I bought the service from an SMS company. But to send the SMS I have to "run" the link below: https://site.com/apiJSON.php?data={"login":"[email protected]","senha":"SENHA","campanha":"ID…
-
1
votes1
answer163
viewsTransform XML contained in a json string
Hello, I need to turn a XML contained in a string into a json object. How do I do this? I have tried some native PHP functions unsuccessfully. <?xml version="1.0" encoding="UTF-8"?>…
-
1
votes2
answers691
viewsPopular Dropdownlist with JSON
-- Controller -- [WebMethod] public ActionResult GetSellers() { List<Seller> sellers = db.Sellers.ToList(); return Json(sellers, JsonRequestBehavior.AllowGet); } -- View --…
-
1
votes1
answer376
viewsConvert JSON to GSON object
I have a webservice ready, which returns a JSON of an object, great, working: Here is the returned JSON: {"Opa":{"nome":"Teste1234"}} This Json is of the following class: public class Opa { public…
-
1
votes1
answer1076
viewshow to make queries passing 2 parameters via Curl?
I need to send via Curl a user and a password in txt same, it is only for test, for example Curl -v -H "Accept: application/json" -H "Content-type: application/json" http://127.0.0.1/Students/ I…
-
1
votes1
answer128
viewsTroublesome socket response on Android NDK
I’m trying to implement this library, Parson, in C, but when I try to manipulate the data obtained via connection socket(ONLY link), I get a null, what doesn’t happen when I manually put the json in…
-
1
votes0
answers221
viewsJsonbackreference and Jsonmanagedreference, bidirectional between two classes
I have the following Dtos public class UserDTO { private String name; @JsonManagedReference("phone") private UserPhoneDTO phone; } public class PhoneDTO { private String number;…
-
1
votes2
answers931
viewsC# Webmethod - Send and Receive the same object (custom) via Parametro
My code: Object: public class Person { private string _Nome; private DateTime _Nascimento; public string Nome { get { return _Nome; } } public DateTime Nascimento { get { return _Nascimento; } }…
-
1
votes1
answer421
viewsGet JSON values using Shell script
I need to list the values of the number and url fields using the json shell script below: [{ "numero": "001", "local": "brasil", "url": "http://brasil.com.br", "ipv4": "10.10.0.1" }] I’m wearing…
-
1
votes1
answer188
viewsJSON list in Angularjs not displayed
I’m trying to return a list of a Java webservice, but on the HTML page it is blank, I do not see my error, below the code. @Path("/contatos") public class ContatoResource { static private…
-
1
votes0
answers29
viewsDo SSE queries overload the browser?
I am working on a real time web project, which seeks information from the server through SSE. That is, the first request is made to the server, after that the server will send a JSON every second or…
-
1
votes1
answer602
viewsHow to send data from an Ionic Framework generated form to a PHP file and return a JSON?
I’ve been following the documentation of Ionic Framework and selling tutorials on the internet, but there is no detail of communication with the server. I would like to send form data and receive…
-
1
votes3
answers246
viewsI need to check if my JSON is empty to search for url with parameter set in Curl
function BuscaMarca(marca, modelo, anomodelo) { marca = $('#marca').val(); tipo = $('#tipo').val(); $.get("curl.php?tabela=BuscaMarca&marca=" + marca + "&tipo=" + tipo, function(data,…
-
1
votes2
answers548
viewsHandling of returns other than JSON
I’m working on an API integration with JSON. I have not implemented anything yet in my code C#, I am for now studying the API but I have already come up with a question. I have a Login method that…
-
1
votes2
answers771
viewsDynamically manipulate an array with multiple Angular.js controllers
Well, I have a feature on my system that has a great interaction with the end user, I soon chose to employ the Angular.js. My goal is popular a array dynamically and when user der Ubmit I send such…
-
1
votes0
answers28
viewsquerying and Convert to array of Objects
i need to query and Convert Rows of code and Location to a array of Objects in javacript, but im having some issues, could someone help me. My code here: $sql = "SELECT code, city_name FROM…
-
1
votes3
answers1314
viewsHow to read a . json file in the Angular module.config()?
I have a config.json file at the root of my project with some information that can be changed: folder path, etc.. I cannot create constants (angular.Constant) in the code, because as I said the…
-
1
votes1
answer1876
viewsLine break Json
I’m trying to develop a system with Node.js and I’m trying to list the database data in my table, but the data stay together this way: I still don’t know much about Json, is it because he’s this…
-
1
votes2
answers115
viewsAjax search inside jquery div clone
I have a search in an input that returns the result in ajax, type autocomplete that is working (when I type 3 first digits it shows the results), but when I put this input inside a div "clone"…
-
1
votes2
answers390
viewsHow to get a json value from a string.string
Having a JSON of the type: {"HOME":{"INTRODUCAO":"midias/video1.mp4"}} How to get the value midia/video1.mp4 from the string var key = "HOME.INTRODUCAO"; I’ve tried to: var key = "HOME.INTRODUCAO";…
-
1
votes1
answer73
viewsProblem consuming Json with javascript
I’m trying to consume this link http://wsloterias.azurewebsites.net/api/sorteio/getresultado/1 with that method: $.getJSON("http://wsloterias.azurewebsites.net/api/sorteio/getresultado/1", function…
-
1
votes2
answers446
viewsWEB Service in Java
I’m creating a Web Service, but I’m having a lot of doubts about how to receive JSON as a parameter. @Path("WebService/{json}") @POST @Consumes(MediaType.APPLICATION_JSON)…
-
1
votes2
answers381
viewsReading JSON result with PHP
I have the following result in JSON and need to treat it with PHP. JSON: { "name": "abc", "count": 6, "frequency": "Manual Crawl", "version": 3, "newdata": true, "lastrunstatus": "success",…
-
1
votes1
answer117
viewsHow to take a json link and use it in php
I get the following json link: http://localhost/json/?conteudo={"Login":"[email protected]","Senha":"12345","Posicao":{"Latitude":"-18.8693459","Longitude":"-41.955664"}} How to play it for php below:…
-
1
votes2
answers296
viewsNode generating Json
I have to develop a Java application that through a Json communicates with Node and changes the site language. The problem is: the Node has to access the site’s literals/Labels at .txt and turn it…
-
1
votes1
answer685
viewsHow to read the return of the json webservice (WEBSERVICE - JSON)
I have this JSON: { "articleList": { "conversas": [ { "cd_resultadofinanceiro": "24", "cd_feedbackfinanceiro": "61", "mm_resultado": "Tomar as devida providencia judiciais.", "dt_resultado":…
-
1
votes1
answer66
viewsProblem with function return
Guys, I have a json code that searches for logged user information, and later, I have another code that searches all sectors registered in the system. The function normally returns the information,…
-
1
votes1
answer325
viewsConvert RSS to JSON Google Feed API
Some time ago I was using the google service google feed api however this service has been discontinued, I wonder if there is any solution to replace, I am doing so with jQuery: $.ajax({ url:…
-
1
votes1
answer238
viewsHow to pass a value from a dictionary (which is inside another dictionary) to a Label? Swift 3
I have a database something like this: { "status": "OK", "data": [ { "id": 1, "name": "Mike", "informations": [ { "id": 474, "text": "My son", "reference": "www.google.com", } ] } I’m looking for…
-
1
votes1
answer3878
viewsc# how to use the POST method with Restsharp
I have a code to log in, but when I send the correct data the API continues to send the code "Unauthorized". The code is as follows:: var client = new RestClient("link"); var request = new…
-
1
votes2
answers615
viewsJson filter in Angularjs
I would like how I can filter this JSON by COD and bring only the chosen one. I am bringing the value of the code by the url and would like to filter only to display the name of the chosen option.…
-
1
votes0
answers192
viewsTraversing JSON
I’m having a little trouble performing a function. I was wondering if you could help me? Well, I need to do a click navigation and each level is stored in a json. A structure similar to this one…
-
1
votes2
answers938
viewsPush in JSON Object Angularjs
How do I add 1 item to a json object in Angularjs. In case I have: {COD: 29, MOTIVO: "teste"} And I’d like you to stay: {COD: 29, MOTIVO: "teste", ID : 12345789} I tried it this way:…
-
1
votes2
answers634
viewsHow to read a JSON using JAVASCRIPT ONLY?
I want to read and present in a.log console the information that is inside my . JSON, but without using jquery or other frameworks. Basic code.
-
1
votes2
answers70
viewsHow to fetch a json value from the goo.Gl API to C#
I’m trying to use the goo.Gl API to shorten some links. The problem is I don’t know how to get the generated return json URL. See below how it is organized: { "kind": "urlshortener#url", "id": "AQUI…
-
1
votes1
answer197
viewsMount Regex to change string json
I have the following string, which will actually be treated as a json, stored in a column in the database in my SQL Server: {"PT":"adssadsadsd "asdada"","ES":"","FR":"","EN":""} How do I…
-
1
votes3
answers361
viewsAttempt to manipulate values of a vector generated by a JSON
I am trying to "change" values of a vector received from the consumption of a JSON. My logic was to create a for to traverse the vector, parse the item on that partition and rewrite into a copy…
-
1
votes1
answer88
views -
1
votes1
answer438
viewsApp webview Session or cookie
Hey, you guys! I’m creating an app (hybrid) for android, from HTML5, CSS and JAVASCRIPT, like Webview. I will use API through PHP using MYSQL, exchanging information with JSON. My question is this,…
-
1
votes1
answer1385
viewsAuthenticate a Json API with PHP
I need to do a user authentication in a JSON format API, I have all the documentation of this API. After authenticating I can make the queries I need. Developer says I precious this to authenticate.…
-
1
votes0
answers957
viewsSend input file value via ajax without form
I need to upload images inside a form. I wonder if it is possible to pass the parameters of the image upload form via ajax outside the general form? If yes, how would I do? I tried some ways, but…
-
1
votes2
answers863
viewsHow to add attribute in JSON array?
I have the following JSON: [{"descricao": "teste", "January": "2454.00", "February": "220.00", "March": "1070.25"}, { "descricao": "teste2", "January": "275.00"}, { "descricao": "teste3", "January":…
-
1
votes1
answer75
viewsHow to access # property in a JSON file with Jquery?
Hello, I am using the Last.fm api and I am having difficulty accessing the #text found inside the image array. Data link -> JSON I try to: console.log(values.track[index].image[index].#text); But…
-
1
votes2
answers704
viewsSending json files to server
Well I’m making an application and it needs to register a certain person, this data I need to send via json and receive what happened. ajax.js /* button #btn_REGISTRAR */ $(document).on("click",…
-
1
votes1
answer6018
viewsHow to make a POST using the Httpurlconnection class of Android?
I need to send a JSON generated in the application Android for a web application. Using the class HttpUrlConnection I did the following encoding: private void sendPost(String url, String postParams)…
-
1
votes1
answer556
viewsReturn JSON with date and time
I’m having a problem returning json with date and time the code is as follows: <?php $sql = "SELECT CRED_NUMERO, MOV_DATAHORA FROM APOIO.LOG_CREDENCIAL_APOIO A WHERE A.CRED_NUMERO = 10734568 AND…