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
answer45
viewsDoubt Command Require
I’m trying to use the require command but this giving error, I’m trying to use in the following code: var Parser = require('C:/Users/gabri/OneDrive/Área de…
-
0
votes1
answer61
viewsConsume this JSON because I am encountering an error
I have this JSON: API JSON But when I consume it I get this error VM414 index.html:1 Access to fetch at 'https://thaleshenrique38.000webhostapp.com/products.json' from origin 'http://127.0.0.1:5500'…
-
0
votes4
answers140
viewsFactory returns blank result
Good evening. I have a Factory with the all function that picks up over $http, an external json, only it’s returning blank. The json address is http://alescrideli.com.br/kibelicia/categorias.json…
-
0
votes5
answers3267
viewsPhp returns null JSON when it has accent in Mysql
Hello, I have the following code in php: <?php $con=mysqli_connect("localhost","user","senha","banco"); $parametro = $_GET["parametro"]; if (mysqli_connect_errno()){ echo "Failed to connect to…
-
0
votes1
answer67
viewsIs it possible to randomize data from a JSON?
I am making a quiz system, where the correct answer will always be the first alternative in the database, but it is necessary that it be random when it comes to answering. (PHP) It is possible to…
-
0
votes1
answer3250
viewsHow to change the color of text selection in VS Code?
In the image, the selected text is with black color, I want to put a lighter color.…
-
0
votes1
answer379
viewsSelect pressed with Jquery change?
I’m studying Json and the Jquery change event. What I need is this When the user opens the page already has results. (in select come marked all) html comes empty and only works when I change select…
-
0
votes1
answer26
viewsFacebook shares/ Likes no longer appear on my pages
Until some time ago I used this URL to recover JSON data from Facebook and display on my pages through Javascript: https://graph.facebook.com/? id=URL. However, the Ikes or shares are no longer…
-
0
votes1
answer73
viewsPrimary Key: Hashmap or Common Object?
Good afternoon guys, all right? My question is this... I want to use Hashmap as the primary key. Is there a problem? Or should I use Object? NOTE: I am modeling the database, which will be with…
-
0
votes1
answer284
viewsHow to search for JSON data in this specific code
I need to do exactly as requested on this post, take Json data and return in a specific field. User Jeffson Silva did exactly what I need and made it available in this Example. Only I ran into the…
-
0
votes1
answer729
viewsHow to convert a string to JSON object
I get in the @FormParam a text in JSON format, I want to know how to make it a JSON object in Java, so I can manipulate the elements? @Produces(MediaType.APPLICATION_JSON) public String…
-
0
votes1
answer187
viewsjavascript selects to filter json data
Hello I have 3 selects and I would like them to function more or less like the example below... EXAMPLE: i have different people inside a json file, in select case I select the option "age range 18…
-
0
votes1
answer298
viewsReturn controller error to JS (Jquery/Ajax)
How to check error on a call return Jquery by ajax for a controller. This return did not come formatted as you would like, just checking the custom fields. $.ajax({ type: "POST", dataType: "json",…
-
0
votes1
answer43
viewsDeserialize string json in obejto on android
I would like to transform this string into an object, alias, put the data of the jsom string into an object. I’m not succeeding, I’ve already received the code 200 of success and I also see that I…
-
0
votes1
answer1462
viewsHow to run a URL by passing C#parameters
Hello, I’m doing for study purposes, a way to search for and bring vehicle information from the FIPE table straight from the api(http://fipeapi.appspot.com/). What I’m unable to do at first is run…
-
0
votes1
answer355
viewsPOST Web API method returning null
I am making a Web API in C# ASP.NET and in the POST method the value is returning me null. I’m using Postman to play a JSON within value but still returns me null. public string…
-
0
votes1
answer758
viewsPython- How to better store input (date) entries?
I have used write ("with open" "write") to overwrite and/or add date(personal names, address,phone) in the.py scripts, and it has worked out, but if I don’t take care it gets messy, both because the…
-
0
votes1
answer220
viewsHow to pick up an item from the return of a json
I would like to know how to store each separate item so I can use it later in one sharedpreferences. There is this class in my program .... public class Tab { private String UC; private String…
-
0
votes1
answer75
viewsHow to read json in html
I don’t know if that would be the right question, but I have an html code and I’m trying to fill in the json I have, but I have no idea how to do it, what I googled didn’t work. my html is this…
-
0
votes0
answers33
viewsProblem with JSON extension in phpMyAdmin
Hello, I needed to reinstall the server (apache, php, mysql and phpmyadmin) and I am having this error when accessing the page localhost/phpmyadmin. Before that it was giving the same problem but…
-
0
votes1
answer105
viewsCombobox loading wrong array information
I made an application in C#(Winforms) to load the marks according to the type of vehicle that is selected (car, bike or walking)in a combobox. I put in a button the following code: private void…
-
0
votes1
answer101
viewsExtract data in Jquery
I am having a problem with Ajax... I am not able to extract the data. They are returned, however, at the time of printing, nothing appears. Follows codes: Model: function livros() {…
-
0
votes0
answers23
viewsButtons with automatic modals based on JSON
Hello I’m making a website that builds images and modals based on Json but I can’t do the script that makes me copy the first div and based on the case numbers, they appear on the side. I had…
-
0
votes1
answer1363
viewsError while trying to run nodemon
Good afternoon, I am having trouble trying to run nodemon on my terminal. It is presenting the following error message: C:\Users\juare\Desktop\Curso OmniStack\aulas\backend> yarn dev yarn run…
-
0
votes1
answer119
viewsajax returning white
I once again here. Come on. Well, here’s my problem: I am passing values to my method in php via ajax, however they are not returning me anything, I did some tests and it is catching on the…
-
0
votes1
answer741
viewsChanging parameters to Modal
I’m having trouble passing parameters to my Modal, I would like to present the data of the selected tuple, I was able to isolate the value properly (atestei by the console.log), however, this same…
-
0
votes1
answer55
viewsSearch words in JSON file using PHP
I am creating a HTML and CSS search bar. I have the Results.json file where all user names are stored. I would like to search what the user typed in the Results.json file, is it possible to? JSON {…
-
0
votes0
answers114
viewsPicking Items from a Json with php
I have the following . Json object(stdClass)#1 (4) { ["card-header"]=> object(stdClass)#2 (5) { ["raceId"]=> string(7) "1706057" ["races"]=> object(stdClass)#3 (1) { ["95049"]=>…
-
0
votes0
answers111
viewsError in python API call - Jsondecodeerror
I’m making this call in a Mailchimp API, but it’s returning an error in json that I don’t know how to solve, can help me?? My code: import requests import psycopg2 key = 'KEY' url =…
-
0
votes1
answer50
viewsIgnore JSON element with PHP
Let’s say we have a JSON with 2 elements to follow: exemplo: { [{ "arquivo": "Arquio 1", "size": "2340" }, { "arquivo": "Arquivo 2", "size": "0" }, { "arquivo": "arquivo 3", "size": "4329" } Use PHP…
-
0
votes0
answers80
viewsHow to set a timeout for a JSON request?
I am developing an application in JAVA, Android Studio, and I need to make some JSON requests. So I created an Asynctask class and do so in theInBackground: @Override protected String…
-
0
votes0
answers49
viewsMap a Json to a Viewmodel via Automapper
I own the following Json (I’m betting just a piece of it). { "filters": {}, "competition": { "id": 2021, "area": { "id": 2072, "name": "England" }, "name": "Premier League", "code": "PL", "plan":…
-
0
votes1
answer136
viewsPass array from one Uitableview to another Uitableview
Talk guys! I’m having a hard time getting the value of a array in a uitableview and move on uitableview. No error appears, but do not print anything on the console when accessing the next…
-
0
votes2
answers53
viewsIn the "while" method adds to the array
I’m trying to produce a script that when I query in mysql it returns an array, so far ok, but the goal is to make this query turn into an edited json. Example:…
-
0
votes1
answer509
viewsSyntaxerror Error: JSON.parse: Unexpected Character at line 1 column 1 of the JSON data
I am trying to create an api in my application, but it is returning me the following error: Syntaxerror: JSON.parse: Unexpected Character at line 1 column 1 of the JSON data I’m using Zend Framework…
-
0
votes1
answer281
viewsHow to indent in JSON format
I am layman still in language, I wanted JSON to be indented. I have the text on one line: [{"titulo":"teste","detalhes":"teste"}] I wanted it this way: [ { "titulo": "teste", "detalhes": "teste1" }…
-
0
votes1
answer260
viewsProblem with Success message after registration of 2 inputs in the bank!
Hello, I have a problem in my code, after registering 2 inputs should appear a message of success in uam green div, but only appears the green div and the message no, already revised the code…
-
0
votes1
answer48
viewsSelect in Json data
With this select example, I get the Account information I have inside my json: select data::json#>>'{account}' as codigo, assinatura from assinante ce where assinatura in ('XXX') I can get the…
-
0
votes1
answer163
viewsHow to return json_encode?
I need to return a select made in PHP. It is working normally, but when displaying the result it returns me an error at the end. I need to return one json_encode to the android recognize. Follow the…
-
0
votes1
answer54
viewsI want to draw a random number and compare it with an array index number
Hello, I’m trying to make a question bank using JSON, but the big challenge at the moment is to randomize my questions. I know more or less the logic but I can’t apply it, I would like to draw my…
-
0
votes1
answer116
viewsError "[ ] cannot be converted to JSON" when trying to create Jsonobject from String
I am using the Kotlin language together with the GSON library to perform JSON object creation/parse. I have the following string that caches a JSON object returned from a server val jsonString =…
-
0
votes1
answer397
viewshow to render a JSON in reactJS
am starting to learn React and want to connect with a server nodejs he’s returning a JSON [{nome:"joão",sobre:"victor"}] then in React: class Page extends React.Component{ constructor(props){…
-
0
votes1
answer76
viewsI don’t get Json return in Ajax with PHP
can’t get out of place, what’s wrong? I don’t get the feedback from Json in Ajax. register Customer.php Ajax.js $.ajax({ type: 'POST', dataType: 'json', url: "crud/insere.php", data: dados, success:…
-
0
votes2
answers212
viewsHelp with json and adodb in PHP
good afternoon, the following code returns me in json... but is in Pdo.. as would be in adodb? $users = $stmt->fetchAll(PDO::FETCH_OBJ); echo '{"users": ' . json_encode($users) . '}'; Edit: I…
-
0
votes3
answers555
viewsNo Return Json to Ajax
I don’t get Json feedback in Ajax. Any idea what it might be? Ajax.js $.ajax({ type: 'POST', dataType: 'json', url: "crud/insere.php", data: dados, success: function(data) { var objeto =…
-
0
votes1
answer430
viewsDeserialize JSON - Dart/Flutter
I have a JSON and want to play it in an array. final String jsonSample='[{"id":1},{"id":2}]'; var json = jsonDecode(jsonSample); print (json); //resultado é: [{id: 1}, {id: 2}] So far so good, but…
-
0
votes1
answer141
viewsError "content-type is not allowed by Access-Control-Allow-Headers in preflight Response." -API Climatempo
Hello, I have a problem with CORS in the Climatempo API, my request code is this: var api_url = '"http://apiadvisor.climatempo.com.br/api/v1/anl/synoptic/locale/BR?token=TOKEN"'; $.ajax({ url:…
-
0
votes1
answer173
views -
0
votes1
answer322
viewsQuery with Foreach and Subquery Node JS and MSSQL
I have a problem that I have not found solution yet, I have a select in a Precedent, I do a foreach in the result, inside this foreach I do another select in another Precedent using the Ids as code…
-
0
votes1
answer34
viewspreventDefault() Does it not work together with ajax/josn?
I’m having this problem that preventDefault(), does not work for anything within ajax. I can see perfectly in the CONSOLE.LOG that it returns false, already tested with Alert to ensure that it does…