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
answer34
viewsWhy does JSON or XML not work?
I got this guy: type S struct { a string `json:"a" xml:"a"` b int `json:"b" xml:"b"` c time.Time `json:"c" xml:"c"` } But neither JSON nor XML works: s := S{a: "Olá", b: 42, c: time.Now()}…
-
1
votes0
answers29
viewsAndroid app shows error
Good night I’m learning to use Android Studio. I’m trying to develop an application that picks up some json data via url, but when running my application, it presents the following error: 02-01…
-
1
votes1
answer1160
viewsCreate JSON with Hierarchy through Excel
I have a table with a tree of products. Category, Group and Subgroup. When I export json by excel the file exits without hierarchy: As in this example: [ { "id_cat": 4, "desc cat": "Acessorios para…
-
1
votes0
answers28
viewsSelect 2 json information
I have the following select to query in the bank the sum of the values of a given day and group by cardBrand. select SUM (amount::numeric)/100, response ->> 'cardBrand' from fatura where…
-
1
votes1
answer748
viewsSelect option in select otherwise with Angularjs
I recently found that example in Jsfiddle to select particular option in one element select. I noticed that it is selected as follows: HTML: <div class="listitem" ng-repeat="Choice in…
-
1
votes1
answer495
viewsWEBSERVICE REST - JSON - JAVA
I’m developing an Android app where devices can communicate with each other via messages (Instant messenger). My application is already connecting with the web service (I developed it using…
-
1
votes0
answers456
viewsSelect2 does not select
Using the Select2 plugin via json I can’t select any results. When you select it does not display the result. I am doing something wrong? $(".PessoaTipo").select2({ language: "pt-BR", placeholder:…
-
1
votes1
answer81
viewsJSON return giving as undefinided in jQuery
I have this ajax request: $.ajax({ type: "POST", url: "retorno.php", success: function(data){ alert(data["nome"]); }, error: function(erro){ alert(erro); } }) And the return.php file: <?php…
-
1
votes2
answers87
viewsMysql PDO array with Json error in view
I’m having a hard time with json_encode echo json_encode($autocomplete -> fetchAll(PDO :: FETCH_ASSOC)); i am doing a database select so far so all right, but when it transfers the data to this…
-
1
votes2
answers3885
viewsExtract JSON object item with Angular.js
I have an Angular application that uses the Google Maps API to search for latitude and longitude, but I’m not getting the latitude and longitude separately. My application works as follows, the user…
-
1
votes0
answers40
viewsHow to convert PHP object array to JSON
I am trying to learn Angularjs and today I have a PHP5 application, but I am not using Restful. For testing purposes I want to run my query and fill a table with the result using Angularjs. My…
-
1
votes3
answers1618
viewsHow to group equal values with JSON
Using the following code build a select of options: $(document).ready(function () { var customersSource = { dataType: "json", dataFields: [{ name: 'Estado'},{ name: 'OrderID'}], url: 'customers.txt'…
-
1
votes1
answer317
viewsJSON formatting created in PHP
I am creating a JSON that needs a specific formatting in PHP, the problem is that I can’t make it look like my JSON template, follow template and my PHP: Model: { "success":true, "message":"",…
-
1
votes1
answer108
viewsView|Brush a field when selecting data in Select
In this code appears the select with the Cities grouped in the way I want, but I would like to click on any of the 'store' options of the select to be opened in some table below the address of the…
-
1
votes0
answers63
viewsphp error to get data from a particular area of a site
Good evening I have a code in php to get the data of a given page, I use the initial template and it works I’m trying to use it in another site like this ai in the template but gives an error:…
-
1
votes1
answer666
viewsHow to edit a theme installed on vscode on Linux
I recently installed vscode and installed the theme Hail Theme, but I would like to change the menu color. For example: when I am in the editor, the menu looks like this: But I’d like him to have…
-
1
votes1
answer119
viewsTake values from an Array and implement within Json using php
How do I get the values of this array array(2) {["Premium"]=>array(3) {["valor"]=> string(3) "100" ["quantidade"]=> string(3) "200" ["status"]=> string(1) "1" } ["Arena"]=> array(3) {…
-
1
votes0
answers75
viewsAdapt code to google maps json url
I followed the code that was in the first comment Link to the comment worked well but when I tried instead of passing the json from wikipedia pass the json from google maps no longer appear results…
-
1
votes1
answer83
viewsDeezer API - Taking Json and PHP values
I’m trying to get some information from the API, I was able to filter some things, but for example, I’m trying to get to the 'preview' link to play 30 seconds of music and I can’t get to it, I’ve…
-
1
votes2
answers403
viewsRead JSON Key with Javascript
I’m having a hard time trying to read the value of a key specific to my JSON. I have the following JSON that is stored in my LocalStorage: {idCmos: "83903", codigoPlang: "302432", tipoPlang:…
-
1
votes3
answers417
viewsAccess different objects from a Json with Angularjs
I need to list all the "posts" of this Json, but I’m not sure how to access it. I’m trying like this:ng-repeat="post in posts" but it returns me only one information, because I need to access the…
-
1
votes0
answers22
viewsHow to recover json
<script type="text/javascript"> $(".addTrack").live('click', function() { $('.playerTocador').css('display', 'block'); var mp31 = $(this).attr( & quot; data - servidor & quot;); var…
-
1
votes3
answers236
viewsReceive json mysql data
Hello, I have the following function to read mysql BD data. Here I call -> $clientes = DBRead('clientes', null, 'nome, telefone1'); Here I display -> echo $nam = json_encode($clientes);…
-
1
votes1
answer39
viewsHow to check an array quickly?
Hello, on my system I get a request in JSON format and soon after it is decoded. This is the mandatory model that the requisition must have. array ( "client_id" => "", "credentials" =>…
-
1
votes1
answer54
viewsName in the index of an array
I need to create an array or object, but with dynamic name/index, like this of the example, but the name must come from a variable: var1 = "testeIndex"; var obj = { var1 : { 'elemento1' : 'dado1',…
-
1
votes3
answers3652
viewsprint json on pure javascript screen
I have this following json structure: "[{ "nome":["fulano 1","fulano 2","fulano 3","fulano 4"], "site":["sitefulano1.html","sitefulano2.html.html","sitefulano3.html","sitefulano2.html"]}]" I manage…
-
1
votes0
answers802
viewsHow to grab a JSON file and decode into C++ ? read the Json file in C++
I have a file JSON with employee data and wish to read this file in C++ to pass para a flash drive and export this file, how to proceed? Follows file JSON: ":"Alexandre N. da…
-
1
votes1
answer74
viewsHow to create a key for an object
I’m trying to make the data inside the json file be shown in html, I made a first code but it was very repetitive with exaggerated arrays so I tried to do it differently but now no longer present…
-
1
votes3
answers77
viewshow to send 2 values to php & get http//localhost/.... php? kk=par1&zz=par2";
Good afternoon guys I’m having a little problem... I have two values to assign the connection php via web serves... the values are saved in sharepreference and saved in "txtid"... to everything ok…
-
1
votes1
answer1587
viewssha1 encryption with python
I need to generate a sha1 encryption of a string value from a JSON file, but I’m not getting it. Does anyone know where I’m going wrong with my code? The code opens the json file, takes the String…
-
1
votes1
answer168
viewsString Split in C++
Folks I’m looking for a split on the following String in C++ [ { "Nome":"Gabriel", "idade": 23 } ] I’m doing it this way... I receive this json through a query get and storing in a string to power…
-
1
votes2
answers190
viewsUitableviewcontroller with Swift and JSON Displaying repeated values
I’m having a hard time getting popular with mine UITableView with JSON. I separated some images to show the problem. Note that in the first Table Repeated values appear and next shows the same…
-
1
votes1
answer82
viewsError searching for Information in Sharedpreferences Android
I have an android application, and in it I keep some basic user information in Sharedpreferences, but started to show the following error parse JSON: java.lang.Illegalstateexception: Expected…
-
1
votes2
answers2471
viewsHow to select JSON elements with Python?
I’m using a news API, it returns me a JSON file: import json import requests url = ('https://newsapi.org/v2/top-headlines?' 'country=us&''apiKey=be7b904493554491afde83281651f05a') response =…
-
1
votes1
answer322
viewsHow to write in json without overwriting?
How can I write to a file, for example test.json, concatenating with what’s in it (without overwriting)? I’m doing it this way, however, it’s overwriting. const fs = require('fs'); const file =…
-
1
votes1
answer200
viewsJson defaults when I request via angular http
I’m making an add-on to Firefox and this is powered by json that comes from an ajax request, which I do via http get method. When I print the json by calling the address directly on the screen, it…
-
1
votes1
answer203
viewsXML returning strange characters
I manage a code in Php that requests server data as a "changelog" from a game server. But in changelog XML returns strange values. As for example in the words "creating" the result is "child§" or…
-
1
votes2
answers433
viewsDeserialize array in Json
I am accessing an API and the return is an array with latitude and longitude respectively. Unfortunately, I am not able to deserialize because it has no properties in Json. How can I get this in C#?…
-
1
votes1
answer32
viewsHow to change Json object?
I’m trying to change the value of this object/property but returns the error of underfined even when I give console.log, I wanted to understand why I can’t get to it. - HTML <li v-for="item in…
-
1
votes0
answers312
viewsProblem deserving Json object with Vraptor4
Good afternoon Personal. I am having problems deserealizing json object with Vraptor4. Taking some tests, you realize a situation: I am using Curl only to test the service, but when I do this…
-
1
votes2
answers537
viewsProblems with JSON on the server
Hello I’m having trouble with the JSON when I climb it to the server.. Example of one of my code they use JSON: $("input[name=people]").keyup(function(){ if($(this).val() != ''){ $.ajax({ url:…
-
1
votes1
answer99
viewsHandle HTTP Request with Item Array as response
Whoa, all right, guys? Maybe this question won’t help anyone, but I don’t know but what to do, you Stackoverflow guys are my hope. Next, on the page I’m mounting, will show all the plans that an…
-
1
votes1
answer561
viewsHow to program in java and python together
I see various programs and systems that are programmed in various languages, such as android. I’m trying to program in java along with python, but I can’t find anything about it. I’ve tried to…
-
1
votes1
answer105
viewsGroup JSON using javascript reduce()
I used reduce to group my Json, but I need to group by more than 1 parameter to make the group correctly. Follows the function used: > this.totalSpecific = obj.reduce(function (acumulador, valor)…
-
1
votes0
answers91
viewsFetch PHP data from Ajax
I have an Ajax script here that his function is as follows.. I have a news system, which by clicking on the title will open a modal and show me the news data (title, text, author).. but I don’t know…
-
1
votes1
answer48
viewsUnderstanding how it works to convert an Object to Json
I have a PUT route that receives a Json in the variable "edits" and from what I understand, in C# it ends up being an object. I was researching a way to receive the file correctly and through some…
-
1
votes2
answers227
viewsExtract data from JSON as an example
I have the following object JSON which is returned after database query: { data: { act: "3 ", searchType: "2", searchData: "33014421" }, convicts: { count: 2, rows: [ { idConvict: 7 }, { idConvict:…
-
1
votes2
answers213
viewsConcatenate Listview into Flutter
I’m trying to display a received list on Json, but I need to concatenate it for better visualization... First case - No concatenation Text(promocoes[index].descrprod) Second case - With…
-
1
votes1
answer730
viewsRead a JSON file and print the data in tabular format
The file is "grids.json", whose structure is: {"students": [{"name": "Alan", "lastname": "Silva", "exam1": 50, "exam2": 80, "exam3": 91}, {"name": "Paula", "lastname": "Souza", "exam1": 95, "exam2":…
-
1
votes0
answers65
viewsSyntaxerror: JSON.parse: Unexpected Character at line 1 column 1 of the JSON data - Nodejs vueJS
I am using an application with vuejs and Node, and I need to get information through a . json, but when making the request I get the following error: Syntaxerror: JSON.parse: Unexpected Character at…