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
votes0
answers105
viewsGrab ID inserted by Ajax
I have a function that includes a register, and when including I call another function, in this other function I need to pass the last ID included, how can I do this ? function SalvarHorario() {…
-
1
votes0
answers49
viewsDoubt Json MVC Core Razor
I have created a method to perform a Insert through Ajax, thus: function SalvarHorario() { //NomeHorario var nome = $("#Nome").val(); var token = $('input[name="__RequestVerificationToken"]').val();…
-
1
votes2
answers973
viewsHow to build a JSON structure?
I have the following JSON: { "status": true, "msg": "", "frete": [ { "Transportadora": "Correios", "Tempo": "16", "Msg": "", "Codigo": "04510", "Servico": "PAC", "Valor": "131.30" }, {…
-
1
votes0
answers139
viewsJson, Hibernate, Spring boot
I’m having two situations that should do the same thing but don’t: package com.example.demo.entity; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import…
-
1
votes2
answers56
viewsPHP array / json
I need to generate a JSON in the following format below: { 'plan_id' => 2, 'customer_id' => 16, 'payment_method_code' => 'credit_card', 'product_items' => [ [ 'product_id' => 3 ] […
-
1
votes0
answers21
viewsPass angular array in json to mvc controller
I have this function that generates an array, I need to pass to the mvc controller through JSON, but it is not passing, follow how I am doing: var app = angular.module('myApp', []);…
-
1
votes1
answer293
viewsAdd document subdocuments - Mongoose
Good evening! I have the following document: { "_id" : ObjectId("5b21a4332a5e3333cc64a12f"), "nome" : "João", "sobrenome" : "Barbosa", "cpf" : "12345678910", "senha" : "Fabet@1010", "viagem" : [ {…
-
1
votes0
answers73
viewsI cannot do Array (in JSON) in Typescript
Below is the Array I need: [ { "id":1, "nome":"LESPAUL", "validade":1525568400000, "dataGerada":1525914000000, "status":true, "itens":[ { "cliente":{ "id":1, "login":"gabriel", "senha":"123",…
-
1
votes1
answer234
viewsHow to turn a JSON into a table/paged list using . Net Core MVC?
I’m studying API access and I’m using the Github API. I want to make a screen in which it is possible to search by name the repositories that match the criteria passed. But Github’s results are…
-
1
votes1
answer277
viewsHow to handle the JSON response with Javascript
<script type="text/javascript"> $(function($) { $('#enviaadv').submit(function() { //document.getElementById('btnConsultar').disabled = true; $('div.mensagem-erro').html('');…
-
1
votes1
answer74
viewsUpgrading from IONIC 1 to 3: How to log in to JSON?
I’m migrating from Ionic 1 to 3, and how many changes. I created my login API, with token: Here I put my authorization code to access the API. And here the result in JSON: ion-content padding…
-
1
votes1
answer174
viewsHow do I calculate the "positives" and "negatives" functions of a json file for HTML in percentage?
Save, I have a JSON file with variables "positives" and "negatives", I would like to transform these values in percentage, "positives" being "like" and "negatives" being "don’t like". After that as…
-
1
votes1
answer46
viewsJavascript: Function is not returning the correct value
What could be wrong with this function? Where is the alert, is coming the correct result but is returning 0. function AprovaCotacao(numForn) { var forn_aprovado = $("#cot_fornecedor" +…
-
1
votes1
answer256
viewsAccess Json Multidimensional PHP/Laravel
I am trying to access a multidimensional Json via Windows and I am not getting the expected result, I need to access phases->games->data->2017-05-13 I will post the code below to find a…
-
1
votes0
answers50
viewsSend a jquery variable via ajax to PHP
I’m trying to send data from a table via Ajax to PHP. I’m doing this by transforming the table into JSON and sending it through Ajax to PHP. The scritp is like this: <script…
-
1
votes1
answer112
viewsError npm install Angularjs-dragula
I need to install the Angularjs-dragula ng2-dragula React-dragula At first I made the mistake: C:\Users\email\Desktop\Parafernalia Test> npm install angular js-dragula --save npm WARN saveError…
-
1
votes2
answers186
viewsTake select description - AJAX
I have this function and need to load the description of the select. In this function I can only load the id, how can I do to in place of x(which is the id) I get the description? function…
-
1
votes1
answer2161
viewsType an array of type any[] at angular 6
I need to type an object, not to receive any[] in agular 6. Well, no get, I get this from the API: { "error": false, "itens": [ [ { "operatorId": "819ee9cc-70b6-44dc-b9e8-afff8705142c", "name":…
-
1
votes2
answers294
viewsupload with ajax and formdata displays error
I’m trying to send a file to the server with ajax and php. I’ve tried variations with people who had doubts on the same subject but nothing works (I’m sure I’m doing something stupid). I have a form…
-
1
votes1
answer261
viewsHow to get a JSON result in Ionic 3, but echo result in PHP
I need to get the result from my JSON which could be "Registration already exists." or "Register Successfully." In my register, I am doing this way: submit(){ var nome = this.data.nome; var celular…
-
1
votes1
answer45
viewsSave a search result to a json_encode
I’m trying to record a result of a query in a json_encode and right after recording in a field in my BD, but I am getting an error message and could not solve the problem. What am I doing:…
-
1
votes1
answer438
viewsError passing parameter through Getasync method
How I pass the object login as a parameter for the method GetAsync ? I’m trying to do it this way, but I didn’t get the error message: private async Task<JsonResult> obterLogin(Login login) {…
-
1
votes0
answers90
viewsAjax/Json POST treatment
I’m having trouble sending Json to my PHP Controller: See, when sending my Login the parameters that are being sent in the request are exposed, thus being a vulnerability. My question is whether I…
-
1
votes1
answer48
viewsFailed to Replace ID with PHP Team Name
I am consuming a web service in php, I created a function to compare championships and return me the id of the teams that will play or will play, in another url, I have the name of the teams and the…
-
1
votes0
answers2231
viewsError: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
I am trying to consume data from an API using retrofit, but whenever I try to connect it returns this error. I’m using a class that is an Array of these objects (Sisalfacatalog) and throwing the…
-
1
votes1
answer437
viewsLoad table via AJAX
I’m trying to load the data from a table, via ajax, this way: function buscaFornecedores(id) { var url = "/Produto/BuscaFornecedor"; $.ajax({ url: url, type: 'GET', data: { id: id}, success:…
-
1
votes1
answer53
viewsArray only loads last PHP record with PDO
I’m generating the information, but it only fills the last line of the query executed inside the Array, even though I’m sure it’s running all the lines in the foreach. Does anyone have any idea how…
-
1
votes3
answers713
viewsSend a string name via post using javascript
Good evening, I’m only trying to send name to the server, but every time I pass the string to the server as "name:", here’s the way I’m trying: <!DOCTYPE html> <html> <head>…
-
1
votes1
answer326
viewsASP.Net Web API - JSON without accentuation %20 %C3%A7
I am consuming an api but the return JSON does not come with the correct accent. in place of the mirror comes %20, for example. in the request json I even put the encoding.UFT8. How can I code this…
-
1
votes1
answer1014
viewsOpen PDF Base64
I have an application that generates a PDF in bytes and converts it to ToBase64String and sends astravés of a JSON for javascript to open, but on Chrome it cannot read this file and present the PDF…
-
1
votes1
answer36
viewsError formatting the Json
I need to generate and expose a Json via web api and the doubt is as follows: 1st. - You cannot expose the attribute "services":null, as the Json generated by me described below ? 2nd. - How do I…
-
1
votes1
answer545
viewsAndroid app does not connect on local webservice
I’m studying webservices but came across a problem, The API works because I can already enter data into the database, I’m using wamp, but in the app, I followed several steps and just don’t send,…
-
1
votes1
answer415
viewsHow to insert a query value into a variable in the Shell Script?
I have a JSON in an archive nomes.txt. the JSON is : {"p": { "nome": ["josé","Maria", "carlos","Artur"] }} I want to play the value of his query in a variable. Show result works fine : #!/bin/bash…
-
1
votes1
answer115
views -
1
votes1
answer200
viewsGet Tjsonstring value from Firemonkey (Delphi)
good afternoon! I have a problem and I’d like to see if you can help me. I have a Datasnap server, which is working normally. In it, I include and query in the database by mobile devices. In the…
-
1
votes0
answers110
viewsError authenticating Json with php by passing header
I have a small problem when consulting a URL with file JSON. Basically my code returns bool(false). $usuario = 'root'; $senha = '123'; $header = 'Authorization: Basic ' . base64_encode($usuario .…
-
1
votes1
answer23
viewsCoding problem A u015bvagho u1e63a (Python3)?
I’m working with wikipedia, and I’m having some coding problems. When I add such a link in my browser everything works fine: https://en.wikipedia.org/wiki/A%C5%9Bvagho%E1%B9%A3a That goes in the…
-
1
votes1
answer123
viewsHow to ensure that the generated JSON does not return error to the Customer?
I created a Web API that returns a JSON and who is having a problem similar to the question JSONP: status code 200 OK and still returns $.Ajax(... error:Function()...). Client consumes the API with…
-
1
votes0
answers28
viewsHow to repeat equal data using data.map
I am using the D3.js library and wanted to, when reading equal data, not overwrite when drawing scales. Follow the code snippet that does this and an example of my file . json: const months =…
-
1
votes2
answers1233
viewsPass Json object array to Controller C# . NET
I need to do a post, and so far I’m trying to do by AJAX to send an object to the Controller, but I’m having trouble receiving the object. View/html: <select name="Servers" id="servers"…
-
1
votes2
answers289
viewsHow to join different foreach results in an array?
I’m picking up information from movie posters from a movie site, using Simple Html Dom. <?php include("simple_html_dom.php"); $html = file_get_html("http://arcoplex.com.br/?lang=059"); To get the…
-
1
votes0
answers66
viewsHow to make a Json_decode from a json file
Hello, I am currently storing data in json format in a fopen file. $json = fopen("$root/apil/Controllers/json/" . $this->getX_id() . ".json", "w+"); $customers_results =…
-
1
votes1
answer239
viewsJSON Regular Expression and Deserialization Dictionary
I am developing a system that receives JSON from several layouts for a single channel and the Router class must identify which layout is by regular expression and perform the deserialization for the…
-
1
votes2
answers272
viewsDynamically popular JSON with PHP/Laravel
I am working with Laravel in a project of a client where I intend to assemble a tree structure with registered users on the system, I found a script that performs this, and for this he uses Jsons to…
-
1
votes1
answer96
viewsValues with different types Gson - Java
I wonder, if there is a way with Gson to get values of different types in a "key-value" array in Json. Follow the example: { "events":[ {"event":"comprou-produto",…
-
1
votes2
answers401
viewsController Dynamic Fields - ASP.NET MVC
I have this JavaScript that creates new fields for me when I need and that makes the call to create the JSON. This counter within the function adicionarCampos() is necessary for something else…
-
1
votes1
answer64
viewsBing API Consumption
I need to get the address of a Bing API image: https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=pt-BR This API returns me a JSON that contains this information I want,…
-
1
votes0
answers34
viewsHow to display the result of reading an XML file correctly
Good morning , I came up with the need to read an XML file available in a URL, however , even following the questions already opened here in the stack as :Query the XML URL the data are returned to…
-
1
votes0
answers1186
viewsPHP - file_get_contents('php://input') is the only way to read contenttype=application/json request?
I have the following Jquery Ajax method function postRefreshJson(_action, jsonModel) { $.ajax({ url: _action, method: 'POST', beforeSend: function (xhr) { $("body").css("cursor", "progress"); },…
-
1
votes1
answer69
views$. post performs twice
I made a code in Java in which I make requests in php and with the return of a json I populate my html, the problem is that at a certain moment I need to execute the Java code but I am not able to…