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
votes1
answer174
viewsHow to properly configure db-migrate nodejs? Error in database.json
I’m trying to use db-migrate but I’m getting the answer, when running db-migrate up, the mistake: [ERROR] TypeError: Cannot read property '1' of null at Class.parseName…
-
0
votes1
answer52
viewsremove [] from the array list
i have a php file that generates a json in array for another application to read, however everything is working but the json is coming with the [] of the list, and my application can only read from…
-
0
votes1
answer49
viewsSimplify Date Request via json
can I return the value of a variable outside the block "in case it would be the variables serverTime and off", say so I can use in another function or in my html code. var xmlhttp = new…
-
0
votes1
answer164
viewsJSON to String API GATEWAY ( AWS )
I need to receive a JSON in my API GATEWAY and pass to my LAMBDA ( GOLANG ) a STRING, The Structure Apigatewayproxyrequest the body is String type, when I try to call the lambda passing the json the…
-
0
votes2
answers284
viewsProblems while rescuing data from a json file
I am trying to upload data from a json file to an html table. I’m trying to rescue the json this way: function getJson(){ $.getJSON('dados/livros.json', function(data){ console.log(data); }); }…
-
0
votes1
answer205
viewsPopular Dropdown with api
Hello, I am trying to recover the json data from a URL, I am following this tutorial https://inducesmile.com/google-flutter/how-to-populate-dropdownbutton-using-json-api-in-flutter/ I was able to…
-
0
votes1
answer42
viewsLoad a json list in JS
I would like to upload a list of my JSON file to use in my Javascript , to use the.table() console with the provided information , This is my Javascript code : fetch("infos.json") // especifique o…
-
0
votes1
answer60
viewsRender Html
I am consuming a json where I have a key with the value of an html tag: import React, { useState, useEffect} from "react"; export const CardHome = () => { const [recebeDados, setRecebeDados] =…
-
0
votes1
answer114
viewsCorrect way to get JSON "Sub Array’s" values in PHP
I made the following code: <?php //dados de um arquivo JSON $json_str = '[ { "documentoId" : 1057615, "nome" : "1542980818602.pdf", "assunto" : "AQUI FICA O ASSUNTO DO DOCUMENTO", "dataEnvio" :…
-
0
votes1
answer153
viewsJavascript - How do I pass a json object in my class constructor?
Good afternoon, I have a question regarding parameters where you pass an object, for example in mongoose has a method connect which we passed to url connection + a objeto to define the options, and…
-
0
votes1
answer47
viewsDoubt in Javascript Map and findIndex
I’m having trouble turning data into json. I have the following code below that takes the elements of my payload and print to json. const _ = require('lodash') let prod = []; let stores = [];…
-
0
votes1
answer502
viewsCheck if Jsonobject has a certain key
this.token() is a String of the kind {"erro" : "Valor do erro"}. But also, in case of success it may be: {"token" : "Valor do token"} My goal with the code below is to find out if the first index of…
-
0
votes1
answer207
viewsInfinite recursion in a bidirectional Manytomany model in Hibernate
I’m trying to create a bi-directional Manytomany relationship in Java, I can already insert into the database smoothly, but when I try to bring data from these tables I fall into an infinite…
-
0
votes2
answers844
viewsCount how many equal names there are within a JSON and display in Nodejs screen
I have a json that has names of equal people, and I need to count how many names are repeated and give a total sum. I did it one way, but he’s counting the number of characters in the name and not…
-
0
votes1
answer53
viewsGrouping of JSON
Hello, Can someone help me with this problem? I have a return of the API with multiple record in JSON format, for example: [ {data:“01/02/2010”, nome:“vivo”, janela:“00-02”, tipo:“ligado”},…
-
0
votes1
answer41
viewsTypeerror in INSERT via Python in Postgresql
I have the following code import json import io import psycopg2 connection = psycopg2.connect("dados da conexão") connection.autocommit = True cursor = connection.cursor() readTest =…
-
0
votes2
answers236
viewsProblem To View Data Json View Blade
Hello! I’ve tried several times and I’m having difficulty visualizing the data of a Json in a View. I’m passing this data like this in Controller: $validatorES = new EntradaSaidaFormRequest();…
-
0
votes1
answer72
viewsHow to rewrite / restructure JSON from external URL?
That is a question that I have long considered asking here at Stackoverflow. I have looked all over the internet for a solution, but I did not succeed. I did not find any subject here on Sopt. The…
-
0
votes1
answer79
views -
0
votes2
answers707
viewsGet maximum, average and minimum value on a JSON of an object array
I have the following JSON: { "funcionarios":[ { "id": 0, "nome": "Marcelo", "sobrenome": "Silva", "salario": 3200.00, "area": "SM" }, { "id": 1, "nome": "Washington", "sobrenome": "Ramos",…
-
0
votes0
answers339
views"The underlying connection was closed" error in REST Httpclient C#
I’m doing a REST integration with C# used Httpclient, most of the time the data was sent successfully, but I went to investigate why some of these were returning with error, found that what they had…
-
0
votes0
answers39
viewsExporting data to Firebase
I’m trying to export a Python database to Firebase. My database is a JSON in the following format: '{ "0":{ "country":"Italy", "description":"Aromas include tropical fruit, broom, brimstone and…
-
0
votes1
answer270
viewsHow to consume a JSON on a localhost webservice with android studio
Good night, so I don’t know if my code is correct so I’m not sure why it doesn’t work, follow my code in android studio package com.example.aplicativoderestaurante; import…
-
0
votes1
answer67
viewsI cannot display the Key element in the table
The previous problem was solved, but now I need to list also the key of my objects, because after I changed the method in my file . ts from snapshotChanges() for valueChanges(), I can no longer…
-
0
votes3
answers99
viewsList with Jquery, second JSON index
Good evening friends, I have the following json which is originated from a url, the result is exactly this: { "cod": "OS78946", "serv": "Pré pago", "passo": "7894", "ocorridos": [ { "data":…
-
0
votes0
answers77
viewsWhat do those 3 initial bytes mean in the response read after Hbtip’s Open() Tipclienthttp() method?
When I call the Read() method, right after an Open() of the Tipclienthttp() class, I get a JSON string from a PHP page. However, I noticed that there are three bytes of strange characters that…
-
0
votes1
answer528
viewsMysql - Cannot add or update a Child Row: a Foreign key Constraint fails (`areas_knowledge`. `sub_areas`,
Hello, I am doing a job that consists in developing a system to manage projects and etc. In this system I need to have a table with the knowledge areas of cnpq. I’m taking the Grande Areas, Areas,…
-
0
votes0
answers51
viewsValue collection via PHP and Json
I have a select where the data is in a JSON database that are available in the link: https://gist.github.com/letanure/3012978.js The select option works normally , that is, the data appears in the…
-
0
votes1
answer679
viewsRemove "[ ]" brackets from json return
I have an api that returns me an array in JSON, as follows: [{"Pessoa_contato":"EUZEBIO"}] But I’m not getting back without these brackets, as my application needs: {"Pessoa_contato":"EUZEBIO"} This…
-
0
votes1
answer94
viewsFill GRID with JSON - Deserialized (Metrogrid - Metroframework)
I’m probably doing something wrong, and I must have made a mistake doing the loop, but come on. I have a class called 'Class.Cs' that has the following code: [JsonProperty("A")] public string A{…
-
0
votes0
answers75
views -
0
votes1
answer59
viewsProblems updating related objects using Entity Framework and Asp net core 3
Hello friends, I hope you’re all well! I’m trying to update two entities using Entity Framework core 3.0. The "Request" Parent entity that has a list of "itensPedidoVM" daughter entities and I would…
-
0
votes1
answer58
viewsData from a file. Json
Eai guys, all right? ... I’m having a problem where I need to get a data block from a json file, being it: { "custom_fields": { "[TS] A empresa em que você trabalha é": "uma fábrica/indústria",…
-
0
votes1
answer40
viewsNodejs ler json time series line by line
Access an API, which predicts future values, the API returns me the JSON below: { series: { '2020-02-13': '62.5000', '2020-02-14': '64.5800', '2020-02-15': '30.7700', '2020-02-16': '60.8700',…
-
0
votes2
answers48
viewsRead Return SELECT Array
I need to return an array in JSON format. Format is not the problem. The problem is to take the $Row index and display. $db = new Connect; $data = $db->prepare("SELECT * FROM…
-
0
votes2
answers40
viewsHow to use "for" to work with data in an array whose amount of varied data is unknown?
I have the following JSON variable resulting from a php query: $json_string = '[ { "id": 1, "name": "Jogos para PC", "products": [ { "id": 34, "name": "Grand Theft Auto V" }, { "id": 59, "name":…
-
0
votes0
answers53
viewsJSON returning two different PHP errors
I’m using PHP with Codeigniter, and is giving this error in an ajax I’m using, I can’t figure out what it is, I get these two messages: syntaxerror: Unexpected token < in JSON at position 1, And…
-
0
votes1
answer38
viewsHow to search STRING inside JSON on Android
I have the following JSON Create_request.txt {"dados":[{ "Cod_Produto":"25", "Produto":"ARROZ", "Quantidade":"200KG", "Estoque":"300KG", "Valor":"1200", "Num_pedido":"41045"} ]} I created a button…
-
0
votes0
answers37
viewsHow to add items from a JSON to a database?
Explaining: I have the following classes to work on, one that is the arrival and return of JSON and others, entities data, follows below: User experiment result: public class…
-
0
votes1
answer166
viewsRecover Json Data with Javascript
I am retrieving a Json by Node/Axios and receive the following structure (A and B). I have 2 occurrences of establishments. RESULT TO { statuscod: 200, mensagem: null, dados:…
-
0
votes1
answer120
viewsReuse Angular component 8 by changing the json structure
I am with 2 similar json, however, with one more constant in one of them. I’d like to match the 2 so I can reuse the same component and on the same call. Ex.: "data": [ { "id": 1, "titulo":…
-
0
votes1
answer246
viewsHow to upload a file with PHP?
I have a function to perform file upload, where I depend on a form <form method='post' action='http://localhost/api/uploadAPI.php' enctype='multipart/form-data'><br> <input…
-
0
votes1
answer23
viewsService in workmanager runs only on usb cable by android studio
I have an android application where after the user enters his company ID he activates a switch and from there the application is posting in an API the position of it. This is done through the…
-
0
votes1
answer37
viewsHow to unify regions with Angularjs no ngrepeat repeating records from a given field
The back-end returns me a json with the records I need to show in the view. A "contract" can have more than one "demand" and when this occurs, it is repeated (in the database by another application)…
-
0
votes0
answers78
viewsTransform html form with json list with jQuery or js
I want to get into the following json to submit my API. { "Ticket":"123456", "toDoList": [{ "Server":"123", "UserName":"asd", "Password":"asd", "File":"" }, { "Server":"123", "UserName":"asd",…
-
0
votes1
answer138
viewsHow to save Unicode text in a . JSON file without escape sequence?
I am creating a program where I need to save in a JSON file a dictionary that contains strings with Unicode characters. See the example below: import json data = {"face": "( ͡° ͜ʖ ͡°)"} with…
-
0
votes2
answers172
viewsForeach in Laravel only returns the first line
I got Following code down on Laravel 7 My controller is taking the many relationship to one as per the model below: public function listarPermissoes() { return $this->hasMany(Acoes::class,…
-
0
votes2
answers769
viewsJSON request on Instagram
I’m trying to get comments from instagram posts. With the code below, I can catch a json with some information about the post through the post link with a parameter __a=1:…
-
0
votes1
answer76
viewsPython - take csv values under certain conditions
I am new in python and am trying to get information from a CSV and pass to JSON. The CSV is of this format: QTD Produto Estoque_Limitado 20 pipoca 1 19 refrigerante 1 21 doces 0 "Stock_limited"…
-
0
votes1
answer1015
viewsHow to read specific information from a JSON file in Reactjs?
I’m having trouble rendering specific information in my code, for example, I would like to render only the "id":1, and the information contained in it. However in the code it renders the information…