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
-
0
votes0
answers31
viewsAjax (Angularjs) returning HTML from the page itself
I am using Codeigniter to retrieve the database data. Controller: <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller { public function…
-
0
votes1
answer161
viewsTurn serialized inputs into JSON
In a datatable there are some columns with inputs. If you click the Submit button I will serialize the inputs of the lines that have checkbox marked. The return of the serialize:…
-
0
votes2
answers361
viewsHow to make input values appear in json?
then I am doubtful here, it would be possible to make the input fields I have play what I typed in a JSON? EX: this would be the form <form role="form" method="post" id="searches"…
-
0
votes0
answers110
viewsJSON with variable fields
I get from a PHP that accesses the Mysql database a JSON that doesn’t always have the same fields, now it comes like this: [{"clu_nome":"Sport Club Corinthians…
jsonasked 6 years, 8 months ago Daniel Tibúrcio 21 -
0
votes0
answers85
views -
0
votes2
answers742
viewsHow to put paging in foreach that returns a JSON list with ajax
I call this function which returns me a list and populates a table in the view, updating every time I pass a parameter through the filter. Everything works perfectly, just need to put paging,…
-
0
votes0
answers760
viewsPOST request sending a String via Retrofit on Android
I need a lot of help from you, I’m wanting to make a POST request via Retrofit, send only one parameter: { "select":"select id || ' | ' ||senha_terminal,nome,login_web,null,5,null…
-
0
votes1
answer86
viewsC# controller function receive an array
I need to take a select array and send it to a function in the controller, but it always arrives as null, even sending the full array. Below is the code: Controller: [AcceptVerbs(HttpVerbs.Get)]…
-
0
votes0
answers97
viewsCustom Loading on Demand
Hello folks would like to make a shipment on demand, but I’m not getting to assemble. Just follow my code: function show(letra) { var itens = ""; $.ajax({ type: 'GET', dataType: 'json', data:…
-
0
votes1
answer115
viewsGet JSON in Javascript (via URI or PHP)?
At this moment I find myself working on a project, and I need to call a webservice that should resume a json, so that later it can be interpreted and fill a dropdown list. Actually, part of the code…
-
0
votes1
answer1841
viewsDeserialize List JSON C#
In my program I do a GET and get the following: {"totalcount":2,"count":2,"sort":1,"order":"ASC","data":[{"2":8283,"1":"Teste","12":6,"15":"2018-03-29 11:30:04","19":"2018-03-29…
-
0
votes1
answer5249
viewsAjax and dataType JSON
When I do so, the return is a parsererror. $.ajax({ type: "GET", url: "servicos.php", data: "id=1", dataType: 'json', ==========================> Essa linha bem aqui success:…
-
0
votes1
answer251
viewsHow to read and sort this PHP json?
{ "groups": { "superadmin": true, "admin": true, "user": true, "Hitman": true }, "customization": { "1": [0, 0, 2], "2": [0, 0, 0], "3": [17, 0, 2], "4": [98, 1, 2], "5": [51, 0, 2], "6": [51, 0,…
-
0
votes1
answer4200
viewsCreating JSON File with PHP
I’m bringing you BD data that will be used as Values of Keys of my new file.json that I’m trying to create. The Keys are being read from an existing JSON file. So, basically what I need to do is a…
-
0
votes3
answers636
viewsObject Reference not set to an instance of an Object. - Json
Follows code: public class Name { public string type { get; set; } } public class Items { public string type { get; set; } } public class Hobbies { public string type { get; set; } public Items…
-
0
votes0
answers448
viewsImage Return Json Database
Initially for clarification, I’m trying to create a hybrid html, javascript and css app. objectively, my obstacle is to display on the user screen your avatar, which is in a Mysql database directory…
-
0
votes1
answer309
viewsWhy is this json invalid?
Why this json is valid: { "query":"mutation{ createCard(input: {pipe_id: 426174 fields_attributes: [{field_id: \"o_que\", field_value: \"Igor\"}{field_id: \"idade\", field_value: \"21\"}{field_id:…
-
0
votes0
answers60
viewsHow to structure data for JSON with PHP
I have the return of a query that brings me the following items from the following query (OBS : are tables created for examples) select * from alunos a left join financs f on f.aluno_id = a.id left…
-
0
votes1
answer42
viewsObjects with javascript
How do I access data from this Json file. For example return the name: { "potions": { "1": { "id": 1, "name": "Aging Potion", "image": "aging-potion.png", "price": 29.99, "effect": "Causes the…
-
0
votes1
answer196
viewsError 403 on request via $.ajax to instagram
Does anyone know why this request via error 403 ajax and URL works normally? instagram changed their api and I found this code that serves as a media pagination, when I request via ajax it from the…
-
0
votes1
answer1911
viewsInsert Json within Json
In a client-server structure (in JAVA), I have the following Json structures separately (example): Structure of Students: {"idAluno":1,"nomeAluno":"Teste da Silva","listaDeTurmas":[1,2]} Structure…
-
0
votes0
answers34
viewsAdding more than one option to the product by the Shopify api
I am doing the integration with Shopify, but I can not by any way found add more than one 'option' in the product using the API. The documentation of Shopify is very bad! Unsuccessful example:…
-
0
votes1
answer105
viewsAPI WEB error with flask
I started my WEB API study trying to create a Pokedex API, When I tried to create the function of searching for Pokemon by number the following error appeared: "json.decoder.Jsondecodeerror:…
-
0
votes0
answers23
viewshow do I read various news, is appearing only the last
//CONEXAO COM O SEVIDOR DO SINDITAC E PEGAR O JSON COM AS NOTICIAS $.getJSON("http://sinditac.siteseguro.ws/api/news.php?t=d18d31bd9b9f5f7b338e41b5986183a2f3008b541d7c84e442", function(data){ // LER…
jsonasked 6 years, 7 months ago Guilherme Ferreira 1 -
0
votes1
answer75
viewsView categories of each post via JSON JS
I’m using the blogger, and I need to "generate" the categories of each post. function posts(json) { for (var i = 0; i < 11; i++) { var post = json.feed.entry[i]; var postLabels = []; } for (var b…
-
0
votes1
answer117
viewsHow to convert a Jsonarray to a Strings array?
String mensao = "[\"brega_falcao\",\"SamiPietikainen\",\"TecRahul\",\"gpantuza\",\"mkyong\",\"mkyong\",\"YouTube\"]"; Mensao is the Jsonarray I want to convert. I tried that but it didn’t work:…
-
0
votes1
answer57
viewsHow to use ORDER BY for a data that does not come from the Bank?
How to use ORDER BY for a data that does not come from db? ex: $query = $mysql->query("SELECT * FROM db_aux ;"); while($row = $query->fetch_array()) { $url =…
-
0
votes1
answer371
viewsGoogle Chart, PHP and Ajax - Pie chart does not show
I’m not able to plot the Chart pie from google Chart. When I change the type of chart to Barchart or columnchart, it plots, but when I put piechart it does not divide. File that takes data from BD…
-
0
votes0
answers137
viewsHow to convert a JSON to a generic class
In a project with multiple client-server applications, I have a number of configuration files in JSON, which contain the connection port, host, etc. For each application, the information in JSON is…
-
0
votes1
answer746
viewsInvalid argument supplied for foreach() - Array
Good morning. I’m trying to consume a json in PHP but I’m having this problem: Warning: Invalid argument supplied for foreach() in D: xampp htdocs api consumir index.php on line 7 Array Code - JSON…
-
0
votes0
answers152
viewsJSON error in PHP : Syntaxerror: JSON.parse!
I have a problem filling Google Maps with some markers, coming from a PHP (json). When I open the browser, error appears: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON…
-
0
votes1
answer416
viewsError with.fasterxml.Jackson.databind.Jsonmappingexception
Error shown: 04-25 14:01:32.589: I/Recebendo pela rede(31129):…
-
0
votes2
answers191
viewsCalculate the total of each row in the table
I’m trying to use Javascript to dynamically calculate my prices multiplied by the quantities and result in the total for each row, however it calculates the overall total and plays in the last field…
-
0
votes1
answer148
viewsSuccess message when registering in BD
The script below worked with the older version of js and Bootstrap, but after I started using the latest it stopped... I use it to return the form message! If anyone can help me, I understand little…
-
0
votes0
answers44
viewsserialize an array and pass as parameter to model
My Action: public JsonResult SalvarCadastro(ListaModelView model) { } My Model: public string Assunto { get; set; } public string Mensagem { get; set; } public List<ContatosEmailModelView>…
-
0
votes0
answers351
viewsHow to fix a Javascript error
I’m using the javascript library P5.js, and I’m trying to access files local, in the current case I am trying to load a json file through the function loadJSON(url) provided by the library. However…
-
0
votes1
answer72
viewsProblem passing some Json messages to Jquery
Guys, I have a form that is passed to my PHP via Ajax in Jquery and returns the result via Json to my console. Follow a snippet of code in PHP. if($tabela == 'setup') { if(isset($_POST['nome'])){…
-
0
votes2
answers139
viewsprint specific data of a json in php
I’m trying to make an application to get the data from cnpj in the IRS api. I can bring and print all the data via json, my problem is that I would like to print only one specific data, which in…
-
0
votes1
answer204
viewsProperty . length of json object returning number out of reality
I have a json array with two property objects, an id and an email, and it has only three ojets within that array, but the number returned from the length property is 152. Can someone help me?…
-
0
votes1
answer187
viewsConvert Gson to List<Object>
I’m starting to learn how to use the Gson library in my code and need to create a list of objects from a Json file. Json:…
-
0
votes1
answer278
viewsAJAX request with different domain
my request url="http://algumip:algumaporta/dowPDFNF?cChave="+chave $.ajax({ url: url, dataType: 'jsonp', success: function (data) { console.log(JSON.stringify(data)); }, type: 'POST' }); error that…
-
0
votes1
answer43
viewsHow do I access this Json?
{ "success": { "data": [ { "IdContribuinte": "1", "IdContribuinteTributario": "1", "IdUsuarioAnalisando": null, "DataAtualizacaoTributario": null, "DataImportacao": "2018-01-12 14:09:26.507",…
-
0
votes1
answer146
viewsRetrieve JSON user data by jquery
I have a json that I am running through the json-server and this in the address: http://localhost:3000/ Inside it, there is a scope of "users", which I would like to take. I have the following…
-
0
votes1
answer595
viewsSelect with Json
Hi, how are you? I am trying to make popular a select with Json that already comes selected item. I managed to make until the select population listing all the models of cars just could not already…
-
0
votes1
answer265
viewsSeparate respective item from a JSON array
all right? I wonder how do I add the respective value in "href" in this foreach: <?php $getJson = file_get_contents('file.json'); $listMenuJson = json_decode($getJson, true); foreach…
-
0
votes0
answers241
viewsHow to recover the tragos data in the api query in NODEJS
Good morning Galera. I am consuming an external api and am receiving the data as follows: { "place_id": "151508663", "licence": "Data © OpenStreetMap contributors, ODbL 1.0.…
-
0
votes1
answer242
viewsProblems using getJSON to load Json from php page
The intection is to take the result of a select, assign in an array, and place its value in an html element. the value is listed and assigned to the array, however, I cannot insert it into my html…
-
0
votes0
answers26
viewsGet the two objects of an array
I receive a request with the following object: { "member_id": 1, "lista": [ { "id": 1, "member_id": 1, "instituicao": "Teste Fund", "data_inicio": "2018-04-25T06:00:00.000Z", "data_termino":…
-
0
votes0
answers414
viewsHow to convert a json return to a C# object display the result on the screen
I’m having a little trouble reading a JSON and convert to an Object and display the data on the screen using C#, I’m using the lib Newtonsoft and would like to know how to check if the data type is…
-
0
votes2
answers997
viewsHow to insert new object in json file
Follows json file: [{"Id":0,"Nome":"","Endereco":""}] Follows the class: public class JsonResult { public int Id { get; set; } public string Nome { get; set; } public string Endereco { get; set; } }…