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
answers65
viewsform Wizard with viacep
I have a problem with the automatic filling of the form when placing the zip in the form Wizard, in a separate form works. With form Wizard: Without form Wizard: Javascript: // chamada da api de CEP…
-
1
votes1
answer1971
viewsImport and manipulate json in Python
I am trying to import a . json file with the following structure: short_description:She left her husband. He killed their children. Just another day in America. headline:There Were 2 Mass Shootings…
-
1
votes1
answer203
viewsJSON error. My code cannot read JSON
I should create a page that shows a catalog of albums provided in xml. Then I have to transform the catalog.xml into JSON and show it in a table with artist and title. The problem is that my code…
-
1
votes1
answer72
viewsTake larger ID and insert Bank
My doubt is the following need to take the ID with higher value and enter the information in it. The PHP file is working but I need it to identify the ID with higher VALUE and insert it instead of…
-
1
votes3
answers660
viewsSearch JSON values for multiple keys
I have the following JSON: { "$SP": { "0": "92", "1": "00:01:36.340", "2": "00:05:48.929\n" }, "$MT": { "0": "91", "1": "00:00:34.187", "2": "00:18:44.001\n" } } I need a function that looks for the…
-
1
votes1
answer53
viewsRecover Model List Passed by ajax through Formdata
I’m sending an image, along with a model that contains a list of integers. But I’m not recovering the moment you enter Action. I can recover the image, field1 and field2, while the field. HTML…
-
1
votes1
answer1117
viewsError converting JSON. (com.google.gson.stream.Malformedjsonexception)
I am developing a program that needs to communicate with an online store, all communication is done via HTTP requests and has as response a JSON. Displays the error…
-
1
votes1
answer305
viewsEntity - Infinite loop in JSON conversion
What happens I’m having a problem using Entity with my application MVC. What happens is that when converting a class to JSON the program enters an infinite loop and ends up returning no-content…
-
1
votes1
answer604
viewsHow to take data from an array without using Index
I’m trying to get data through an API (bet365) it returns this data in JSON, I created a function to extract this data and transform into array It follows function: public Function api_football(){…
-
1
votes1
answer1026
viewsConvert Java object to JSON with Gson (generating with backslash)
I am trying to generate a JSON based on a Java object. JSON is being generated, but some bars have been included improperly: import java.io.Serializable; import…
-
1
votes1
answer106
viewsForeach or for inside an Anynimous Type C#
I am mounting a return of an Api on JSON, And the comeback I ride in Anynimoustype I believe that’s what it’s called, in it I name the variables as they go to Json, but I needed to make a foreach to…
-
1
votes4
answers1922
viewsHow to browse a list using each JQUERY
The scenario is as follows: I get a JSON array from my webservice and every time I go through, I get the information according to the index (event 1, 2, 3, etc) My job is this::…
-
1
votes1
answer441
viewsStruct with JSON in C++
I’m having problems inflating a struct using a JSON file, in fact I don’t know how to do it, I’ve been researching about the Jsoncpp library, but I was not successful. Follow a simple example of my…
-
1
votes1
answer53
viewsGet parameter passed by POST with $.ajax
I’m having trouble getting the id passed by the ajax date (jquery), what happens is using $_POST['id'] or filter_input(INPUT_POST,'id') empty follow the ajax: $.ajax({ type:"POST", url:…
-
1
votes1
answer361
viewsReturn JSON Infos in MYSQL in SELECT itself
I have a table in BD called "menu", with a column called STRUCTURE. It was text-like, and in it contains a JSON with a menu structure referenced by Ids from another table "category". Ex: [{"id": 1},…
-
1
votes1
answer51
viewsConsumption WS Rest returns null
I am consuming a WS to get data from vehicles, the API that I was passed returns a JSON: { "success": true, "message": "", "result": [ { "Codigo": "1013", "Placa": "ABC1234", "Ano": 2016, "Uf":…
-
1
votes1
answer383
viewsError deserializing Model JSON data
JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'SoftluxWebCore.Models.Tabelas.Financeiro.CaixasModel' because the type requires a JSON object (e.g.…
-
1
votes0
answers114
viewsJackson Fasterxml - @Jsonmanagedreference and @Jsonbackreference
I’m using the notes @JsonManagedReference and @JsonBackReference to map my bidirectional relationship, with this I was able to eliminate the infinite loop bug, but it led to another problem. I have…
-
1
votes1
answer50
viewsIs it possible to take a data from a JSON using a predefined variable?
I have a link with an attribute that has the information of which JSON data should be obtained. <a href="#" data-json-code="code_118"></a> And I have the code responsible for its…
-
1
votes0
answers234
viewsDelphi Json Treeview Dataset
I haven’t seen anything like it here yet, No Delphi a select no dataset returns the data to my tree this way: ID PARENT NOME 1 null GrandFather1 2 1 Son1 4 2 GrandSon1 5 2 GrandSon2 3 1 Son2 6 null…
-
1
votes1
answer554
viewsProblems with Serialize Delphi - tkPointer
Good morning, I have a problem trying to use the function: TJson.ObjectToJsonString( Pedido ) Da Unit REST.Json The object I’m trying to convert to Json is as follows: unit class_regjson; interface…
-
1
votes1
answer100
viewsSimplify foreach to update a mongoDB doc that has nested objects and arrays
I want to update the value of the 'shouldSendAlert' key in a mongoDB document that is in the following structure: { "_id" : ObjectId("5c61c4db46d18e1092c5b024"), "service" : "SRVPVD", "menu" : [ {…
-
1
votes2
answers949
viewsHow to get the value of a field of a JSON object
How can I pick up the correspondent to earnings in JSON (Value 0€) and output in Javascript? That is, so that on the website the corresponding to Earnings (0€) in what I identified as OUTPUT DE…
-
1
votes1
answer74
viewsSet colors in Google Geochart Laravel?
I’m trying to define the colors of the Brazilian states, which are coming from mysql via json the information, but I’m not having resulted in the return of colors. Ex.: São Paulo in color Blue -…
-
1
votes1
answer1563
viewsAdd or Remove Inputs with JS
have a question?! on the link below: jQuery1.7.2 compatibility issue for jQuery 3.3.1 i have a code that calculates some inputs based on price, quantity, subtotal (price * quantity) and overall…
-
1
votes2
answers836
viewsReturn data from a Json where there is a specific key in a PHP variable
I have a JSON with a standard structure. Within the structure I have the codTipo that would ruffle between To and B { "codSeq": "001224", "codTipo": "A", } { "codSeq": "001244", "codTipo": "A", } {…
-
1
votes1
answer65
viewsIs it possible to create object inside object in a constructor class?
I am trying to create a Client class that has the following parameters: { "data": { "name": "Yuri Moura", "cpf": "123.456.789-00", "status": "Ativo", "contact": { "email": "[email protected]", "tel":…
-
1
votes1
answer47
viewsPdo passsa return vaizio in JSON
I am trying to make a cash flow chart with input and output, however, when the JSON value is returning empty. follows below the code PHP $ano_hoje = date('Y'); $janeiro_entrada =…
-
1
votes0
answers48
viewsevent $.post ajax alert status
I’m using $.ajax post on jQuery so: $('#btnSave').click(function () { let data = $('#addRunner :input').serializeArray(); $.post('addRunner.php', data, function (json) { if (json.statusF == 'fail')…
-
1
votes1
answer3091
viewsChange element color with React
I am trying to change the color of an element based on the status string. Ex.: Green to 'Active', Red to 'Inactive', Gray to 'Blocked' I managed to do this in JS Puro, but I’m having trouble making…
-
1
votes1
answer137
viewsJSON badly formatted
Hello, my friends. I am generating a file . json with PHP, but even when it is created it is badly formatted, it is not possible to read its data. See: { "0": "6", "idt1": "6", "1": "2018-10-19",…
-
1
votes1
answer134
viewsHow to take a JSON String and display in recyclerview without repeating?
I have a json with a list of users, photos posted by this user. The idea is to have a recyclerview with the name of the users, and when clicked, it will display the photos of that user. The…
-
1
votes2
answers94
viewshow to handle JSON Array in PHP
I’m having difficulty dealing with this Array not being able to hit the paths in PHP. Below I list the Array { "Result": [ { "MatchKeys": "doc{57279000000}", "CreditData": [ { "Origin": "DATABANCO",…
-
1
votes2
answers668
viewsProblems trying to access JSON file in Python
Hello, I’m trying to read certain data from a JSON file in Python, but I’m having some problems... This is the JSON file: { "linguagem":"Python", "dados":"JSON" } Implementing the JSON file directly…
-
1
votes1
answer245
views.net core json files
I am making a simple web application, it will read a json file: { "hotelName" : "Jumeirah Creekside Hotel", "thumb": "https://loremflickr.com/130/100/dubai", "stars" : 5, "location" : "Garghoud",…
-
1
votes3
answers2356
viewsAccess data from a JSON structure
I’m having some problems trying to access some data in a JSON structure. The JSON code is this: [ { "teste":[ { "dados":"teste", "uno":[ { "um":"Teste", "cores":[ { "preto":"Preto",…
-
1
votes1
answer59
viewsLaravel Seed, relating models from a JSON
I’m doing a Seed from a Json file, I can read and populate the data, but at the time of linking the relationship between Dealership and Brands I can’t. How would I do that? With the $filename =…
-
1
votes0
answers980
viewsHow to take or manipulate data inside subscribe - Angular
Unfortunately I can’t, even inside the subscribe, scroll through the variable fixtures$ I can send the data to html and show in the table. However I need to manipulate the data to save in the bank…
-
1
votes2
answers466
viewsReading JSON with many PHP arrays
I am trying to treat this JSON with PHP but I cannot return the data to some variable. When I try to access a position of it is returned null. $url = 'https://api.hgbrasil.com/finance?format=json';…
-
1
votes0
answers34
viewsAngular 6 with broken Laravel/Lumen JSON
Guys I’m sending an angular post to a Windows/Internet application, but my JSON arrives broken. Now when I send by Postman, it arrives this way. follows my Angular code cadastrar(register:…
-
1
votes1
answer3166
viewsConfigure CORS on a PHP page with Basic Athenticate
I posted the page php test. in the field: https://www.teste.com/api/teste.php <?php header("Access-Control-Allow-Origin: *"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1…
-
1
votes2
answers33
viewsUrl in jquery is being mounted wrong
I have a View called Invoice, inside a controller named Order. If I take my jquery and leave url: '', it already mounts in the browser that: locahost:porta/dominio/order/FaturarPara I’ll go to…
-
1
votes0
answers239
viewsunit test with mocked Json
I am trying to create a test from a json file that I have with the mocks of the Api response. But when I run the unit test the variable stream the return is null, ie it can’t read the file resulting…
-
1
votes1
answer296
viewsTurn Date into String and Format to DD/MM/YYYY using Typing
To send a request to the server, I need to format the parameter dataNascization so that it goes in DD/MM/YYYY format. Right now I’m sending him like this : Request URL:…
-
1
votes1
answer78
viewsConvert JSON file to object - C# Xamarin
I have the following JSON file: { "createdAt":"Apr 17, 2019 10:28:39", "id":"52329770-64e2-4759-9d3d-f2595973de4e", "items":[ { "id":"82d2e4ab-da74-45df-a9ea-99cc257ead59", "name":"REFRIGERANTE KS",…
-
1
votes1
answer715
viewsHow do I search for JSON object property values in PHP/Mysql?
I need to filter the tags, they’re separated by comma: { "tags":"Tag 1, Tag 2, Tag 3" } Using $busca = 'Tag 1'; $sele2 = $pdo->prepare("SELECT * FROM quiz_publico WHERE quiz_json like…
-
1
votes1
answer45
viewsUPTADE with JSON and Php
I’m trying to do an uptade with json and php, however, is giving error and do not know what is the problem. If someone can help me I appreciate. function uptade_cat() { var valor=$("#valor").val();…
-
1
votes1
answer58
viewsAdd values in the array from a JSON that has the value of a variable
I created a variable called arrayFaixaD: var arrayFaixaD = new Array(); and created a for which reads the entire JSON file: for(var i = 0; i < json.length; i++) within that for I put some if:…
-
1
votes0
answers225
viewsBrowse Json VBA Object
Good night, I’m having difficulty traversing the object to get the result of a API Object to be covered Sub AtualizarJogadores() DoCmd.SetWarnings False Dim Movie As Object Dim R As Object Dim…
-
1
votes1
answer1204
viewsHow to pick only 1 item within an array, JSON & PHP
I’m learning a bit of json and php, I was able to display the values with the saveoffline api.…