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
-
-2
votes1
answer338
viewsHow to put an array value in an input?
I’m having trouble inserting the values of an array into an input with JS. What I’m looking for is, make it look like there’s a person writing and it’s not a value that’s been entered quickly and…
-
-2
votes2
answers94
viewsphp’s difficulty getting select text fed with javascript and json
The javascript code below fills in the select "regions" (id) options of the json file "list-region-programs-municipio". But in the html form this fills the value with ID value in json. And if you…
-
-2
votes2
answers798
viewsHow to get header data in PHP post
Guys, I’m having a hard time getting a specific header data sent by Pagar.. When sending a postback to the site server, I need to use the signature sent in Header, in case the X-Hub-Signature…
-
-2
votes1
answer168
viewsHow to separate and identify objects within an Ajax request, with data coming from Servlet via Json?
How do I separate the objects inside the Ajax? The Servlet sends a list of objects to Ajax, but I can’t separate them inside the Ajax to be able to pick up an attribute from a specific object, for…
-
-2
votes1
answer185
views -
-2
votes1
answer168
viewsHow to customize PHP errors?
I’m having the following doubt, imagine I’m making the requisition of a file JSON external via a script PHP <?php $json_file = file_get_contents("http://exemplo.com/arquivojson"); ?> And if…
-
-2
votes3
answers140
viewsI can’t view all data with foreach in PHP with data from an API
I am trying to bring to a simpler way the following information coming from an API: { "results": [ { "date": "2020-01-05T00:00:00Z", "total": 100, "visits_detail": [ ] }, { "date":…
-
-2
votes1
answer889
viewsConvert string to json [Python]
I have a case where I have a json(is like clob) in the database and I want to use it to make a post request and everything by python, but I have a problem at the time of converting this string to…
-
-2
votes2
answers124
viewsError saving JSON via fopen, downloaded via Curl
The command below, accesses an API via Curl, searches for a JSON file, creates a folder inside the /logs folder, and saves the JSON file, so far no problem. However when saving the JSON file it is…
-
-2
votes1
answer98
viewsHow to join fields from a php array
Good evening, so I’m facing a problem with an array, my idea is the following, create an array $MESA[IDMESA] and within that array I would have all information about a particular table that is…
-
-2
votes2
answers76
viewsAdd name to json Key
In this my code below it returns me json with the key "services:" however I am not able to put a name "Flight:" in the second key. how can I make this key named $final['servicos'] = [];…
-
-2
votes1
answer194
viewsI have a return in Json and I want to get the data in C# (CNPJ Data)
I have a link that I pass the CNPJ (https://www.receitaws.com.br/v1/cnpj/@cnpj) and it returns me a json with all the information, what is my doubt, how do I take this information as Social Reason,…
-
-2
votes2
answers1217
viewsProblems with Notice error: Undefined Property: stdClass:
Hello I’m new in IT and I’m developing an API pro Tiny that makes a query of tax notes but I’m having a problem showing these formatted results, I created a foreach which aimed to select only the…
-
-2
votes1
answer69
viewsFiltering information from . JSON
I have the following script: import json import requests def clima_semana(): requisicao = requests.get('http://api.openweathermap.org/data/2.5/forecast?q=Rio de…
-
-2
votes1
answer1094
viewsRead Python Json file (beginner)
Good morning! I’m starting in python and I’m not able to read two specific fields in the generated json, with the following format: [ { "nomeArq": "arquivoA", "dataAnt": "28042020", "dataAtu":…
-
-2
votes1
answer645
views<<Flutter>> Doubt on return of Map - //Map <String, Dynamic>// - this returning: null
I will leave the code block --(Recovers api from https://viacep.com.br/, data listed on Cod, end of studies and training) import 'package:flutter/material.dart'; import 'package:http/http.dart' as…
-
-2
votes1
answer70
viewsAjax does not send data to PHP
I have the following code in Ajax: <script> $('#enviar').click(function() { let dados let filtros = document.getElementsByName('filtro[]'); let filtrosvalidos = [];…
-
-2
votes1
answer38
viewsNot displaying all array values on the screen
I made a call to get JSON values from an external code (PHP). In console.log, shows all the data right, but when I go from jquery to display on the screen, it only returns me the last value of the…
-
-2
votes2
answers83
viewsProblem when deleting item in a json file
When accessing this route that deletes an item: app.get("/excluir/:id/:categoria", (req, res) => { let dados = JSON.parse(fs.readFileSync("./data/dados.json", "utf8")); var id = req.params.id;…
-
-2
votes1
answer32
viewsMultiline string problem for twitter API in Dart
I’m creating a bot that tweets on Dart. I’m having problems because I want to post with line break but I can’t, the following error appears when I try to convert a string into json through the…
-
-2
votes1
answer95
viewsHow to browse a dictionary within a python list?
I have the following JSON: { "Aeroportos": [ { "Continente": "Europa", "País": "Grécia", "Localização": "Atenas", "Nome": "Aeroporto Internacional Eleftherios Venizelos - Atenas, Grécia (ATH)",…
-
-2
votes1
answer27
views.NET Core JSON parameter
I’m starting to learn C#, using . NET CORE, and I’m trying to create an API that searches a Mongodb bank. I’ve looked at some topics here, seen some things, but none of the solutions I found worked.…
-
-2
votes1
answer62
viewsHow to translate fields of a json?
I need to do a translation of the fields of a json. I want to inform as input a multidimensional json and as output receive another json with different fields, but remaining the values. Input…
-
-2
votes1
answer67
viewsHow to show API results in HTML?
I’m with a project where I have an HTML input, where I send the link to an image of a car, goes to an AI that searches for an API. So far so good, the result comes back right on the console. The…
-
-2
votes0
answers13
viewsclickSign API
I’m new to php, I need to do an integration with the Clicksign api, but I can’t do it at all, someone has already done this integration? $document_key = "9955"; $name ="Juliete"; $email =…
-
-2
votes0
answers21
viewsError in return Curl PHP
I’m having a problem as to my CURL result that is returning me a non object in the call: $resultado = json_encode(curl_exec($ch)); var_dump($resultado); Returns like this: string(4352) ""\r\n \r\n…
-
-2
votes0
answers13
viewsTake the path of an external file in JSON
I am working with a project in Laravel in which a controller calls a JSON file with the parameters and this JSON file must take the path of another controller and access the action determined for…
-
-2
votes0
answers10
viewssort object - JS
I would like to sort this type of JSON by date in javascript, it is possible?? { "5d8b3e18-b134-4cce-b77c-804535da6140": { "titulo": "post Atualizado", "chamada": "API nova CHAMADA 3", "data":…
-
-3
votes1
answer302
viewsFormat JSON result with data returned every 30 minutes
A short time ago, I asked this question: Recover parameter to filter in SQL: date and time every minute Now I need the result to be in the same JSON format as below: {label:'00:00', y:92 ,…
-
-3
votes1
answer200
viewsReserved word as variable name
I’m building a program that integrates an online store with another program that controls the physical stock of a store. Communication is done through HTTP requests that respond in JSON format. In…
-
-3
votes1
answer229
viewsVariable inside a php array
I have a foreach where I search the value and name of the products, ai i’m trying to integrate a varial php within an array of paghiper in json, for it generate the boleto, as I can do this ? I need…
-
-3
votes1
answer264
viewsBrowse JSON with Javascript objects
Good night, you guys. I’m starting in JS with VUE.. I have a situation that I could not solve: I have 1 JSON object with 2 objects that come as a return: retorno = { obj1 = { "permitido":false,…
-
-3
votes2
answers39
viewsPass an array to another format
The array is coming in this database format: array (size=12) 0 => array (size=3) 'maquinas' => string '111' (length=3) 'mes' => string '1' (length=1) 'YEAR(data_ordem)' => string '2016'…
-
-3
votes2
answers246
viewsPassing PHP Javascript PHP Parameters
I need to pass a parameters via JSON of a PHP page Javascript PHP, I’m using the Ajax method of Jquery but I’m not getting, follow code snippet. ✓ Index.php <html> <head></head>…
-
-3
votes2
answers83
viewsRead JSON with JS
I have the following code const dados = [ { "cnpj": "1234567891011", "serie": "1", "numero": "1" }, { "cnpj": "1234567891011", "serie": "1", "numero": "2" }, { "cnpj": "1234567891011", "serie": "1",…
-
-3
votes2
answers163
viewsString replacement in javascript
I have an input that receives a code composed of 4 letters <p>Localidade <input type="text" id="localidade" oninput="MyFunction()"> <span id="ca"></span> </p> I intend…
-
-3
votes1
answer83
viewsHow to filter and sort rewritten JSON elements with PHP?
The script below fetches the JSON file and restructures it into a new template. <?php $json_strcont = file_get_contents("http://app.tce.ma.gov.br:8889/remessas?enteId=2102309"); //Puxa todas as…
-
-3
votes2
answers352
viewsRead JSON multidimensional array via PHP
Gentlemen, I’m having difficulty reading a JSON that comes via API, I receive it in the following way: $json_file =…
-
-3
votes1
answer82
viewsReturn Undefined in html for JSON object request
I’m trying to return JSON objects from an api, only when the elements are rendered in HTML, the value passes to Undefined. I believe it is something with the request in appenChild, since it returns…
-
-3
votes1
answer53
viewsPython Flask Typeerror: 'Nonetype' argument is not iterable
I have a Web Application that uses Flask that was working right only it is now returning me an error. The application does a search in the name of the players in a json file, in the execution of the…
-
-3
votes1
answer55
viewsOnly json content between []
I have a question about a code I made using scrapy to collect data and send to a json file. The problem is that the file formatting is not as it usually is, so I found it strange, I’m in doubt if…
-
-3
votes1
answer81
viewsFacebook Json - Problems with accentuation - Python
I’m trying to import the Friends.json file from Facebook, but I’m having trouble accentuating it. Friends.json file is something like: { "friends": [ { "name": "Marco Aur\u00c3\u00a9lio Ferreira",…
-
-3
votes1
answer65
viewsScript that is in Javascript for Python
am with the following Javascript function: function main() { let data = fazGet("https://economia.awesomeapi.com.br/json/all"); let moedaJSON = JSON.parse(data); console.log(moedaJSON) const keys =…
-
-3
votes1
answer37
viewsAccess JSON that content is an object - Javascript
I am "pulling" a json into my code whose content is an object within an array. My goal is to take each attribute (news and title news) of the object and insert it into html. But the return I have in…
-
-4
votes1
answer152
viewsHow JSON works in a project
Hello, I’ve been asking many questions, which seem basic, but causes me confusion, so better ask, rs. I would like to know how the . json file works in a project, what it does. Thank you!…
-
-4
votes1
answer77
viewsPython - I would like some examples of using "APLICATION/LD+JSON"
I’ve always worked with REST for integrations, now I’m using a new system where I can’t use only pure JSON, they use LD Json, and I still don’t quite understand this concept and I’m having some…
-
-4
votes1
answer23
viewsendpoint to filter post by custom taxonomy
So I’m developing a we app, and I need to filter the posts by taxonomy to look like this get below. https://usevida.com.br/site/wp-json/wp/v2/post_type?custom_taxonomy=result…
-
-4
votes1
answer179
viewsGet CS:GO JSON item status
Good is the following I have the following code that causes you to take all items/weapons from the inventory of a particular individual and show it. Well what I wanted to know is how do I do apart…
-
-4
votes1
answer193
viewsHow to feed a JSON using "for" Javascript
I have a json in Javascript: var cards = [ { name: "Opção 1", img: "images/opcao1.jpg", id: "1" }, { name: "Opção 2", img: "images/opcao2.jpg", id: "2" }, { name: "Opção 3", img:…
-
-4
votes2
answers129
viewsHow to delete a json object with python?
data = ler_repositorio() print (data) excluir_funcionrio = input('quem você quer excluir: ') print('Tem certeza?') print('1 - continuar') print('2 - voltar') opção_adquirida = int(input('Escolha:…