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
votes2
answers118
viewsProblems with JSON + PHP
I have a file JSON which is being used to store settings, and a file php, which reads and fills the file according to the data reported, however after the settings are edited for many times the JSON…
-
1
votes0
answers47
viewsJSON for websocket gives error
I send a JSON to the websocket. JSON and sending is set like this: var binary = btoa(Uint8ToString(view)); var toSend = { 'fileName': fileName, 'sequence': SendedChunks, 'data': binary.toString() };…
-
1
votes1
answer197
viewsArray has values, but its length is zero
I need to iterate on this array, however, although it is not empty the length of it returns 0 as you can see, someone knows the reason? The scenario is as follows: I am receiving JSON data from an…
-
1
votes1
answer633
viewsGroup List with java 8
The input data would be a list of Products as below [ { "id": "123", "ean": "7898100848355", "title": "Cruzador espacial Nikana - 3000m - sem garantia", "brand": "nikana", "price": 820900.90,…
-
1
votes1
answer314
viewsHTTP connection to server does not return JSON data
Hello, I am trying to get the data of a query via HTTP, but it is returning me this error: org.json.JSONException: End of input at character 0 of The Code I have is this: private class AsyncFetch…
-
1
votes1
answer486
viewsGrab Object in JSON
How can I take only the property "name":"josimara" in that code ajax, I’m new in this area, thank you for your help. <script src="http://www.habbid.com.br/assets/js/jquery-1.9.1.js"…
-
1
votes1
answer38
viewsmount HTML element with vanilla JS, cannot list all JSON elements
Where is the error in my code? I’m not getting to list all the names each in one <li> different, in my console.log(items[i].name) all JSON names appear, but when creating the html element it…
-
1
votes1
answer65
viewsConvert a custom Object to JSON in Totalcross
It is possible to serialize a Custom Object for JSON without having to insert field-by-field, for example: JSONObject jsonObject = new JSONObject(); jsonObject.put("id", meuObjeto.id);…
-
1
votes0
answers344
viewsSend selected data in an External Json list to email (Fipe Table Query)
$(document).ready(function() { var urlBase = "http://fipeapi.appspot.com/api/1/carros/"; $.getJSON(urlBase + "marcas.json", function(data) { var items = ["<option value=\"\">ESCOLHA UMA…
-
1
votes1
answer1393
viewsres.json Nodejs/ Express
I have a cruel doubt in nodejs/ Express, I am very new in language but what I need is to pass the id in a route to execute and return a query. I’m wanting to do in fragmented files, so I have a…
-
1
votes0
answers78
viewsHow to calculate Mbps?
I’m picking up information from the interface of an internet modem: Txbytes, Rxbytes, Uptime He gives me a json input: Entrada=([[ { "uptime":"15423", "txbytes":"1147089", "rxbytes":"23124634" } ]])…
-
1
votes3
answers127
viewsHow to check if a select is null
Guys, I have this code that pulls info from the server try { $conecta = new PDO("mysql:host=$servidor;dbname=$banco", $usuario, $senha); $consulta = $conecta->prepare('SELECT * FROM…
-
1
votes4
answers1576
viewsPOST API Rest JSON
I have a form in HTML which should send data to a server in format JSON. How I format this input data and send to a Rest API the JSON data the way I described below? In my view I need to do a POST,…
-
1
votes1
answer241
viewsReceive JSON string via Socket
I’m getting a stream with JSON strings and I’m showing on a Tmemo. It happens that I am not able to process the JSON correctly because not always comes the same amount of characters from the server.…
-
1
votes0
answers106
viewsHow to make two querys in a JSON?
I’m mounting a map using the mapbox API, creating some points dynamically on the map. I have a JSON that gives me some information (getDados.php), but I wanted to perform one more query inside this…
-
1
votes3
answers447
viewsTake JSON object dynamically
I have json that I created and wanted to dynamically take the array and objects inside it var json = [ {'PHP': [ {'aula1': [ 'txt','O PHP é uma linguagem ...', 'img','caminho','descrição' ] },…
-
1
votes1
answer177
viewsselect part of the JSON that was filtered in Where
In the database I have a field called resources, in it I save the permissions of a user, in Json format: [ { "rota":"reserva", "sref":"oQueFazer", "ordem":"1", "recursos":[ "index", "show", "store",…
-
1
votes1
answer587
viewsInsert JSON file into database via PHP
I have a JSON file that I need to do the Insert of the information contained in it in the database. JSON file:…
-
1
votes2
answers207
viewsError when picking up JSON elements
Speak guys, blz? I have a problem when it comes to receiving the answer in JSON from Ajax, I can not popular all states in select. Although it is inside of a being it takes only the last element, ie…
-
1
votes1
answer307
viewsView JSON data in Listview
Guys as I load a Listview with the result of a method that returns an object already loaded with JSON? Method that loads object with JSON namespace MeuProjeto.ViewModels.jsonModels { class JSON {…
-
1
votes1
answer2632
viewsFill in INPUTS with ajax
I have some fields that I need to fill with AJAX of a SELECT in php. I am already able to fill in the ID field, and CLIENT, now I have to fill in the rest of the items, such as ENDERECO, CPF,…
-
1
votes1
answer393
viewsHow to remove null, false and true values from Json file?
I have a JSON file with this data: { "in_reply_to_screen_name": null, "favorited": false, "id_str": "92", "entities": { "user_mentions": [], "symbols": [], "urls": [], "hashtags": [ { "indices":…
-
1
votes1
answer568
viewsFill out a form with Json data in jquery
Good night. I have a url that gets this json structure: { "kind": "books#volumes", "totalItems": 1, "items": [ { "kind": "books#volume", "id": "AKs0vgAACAAJ", "etag": "4X6Xl91J0mQ", "selfLink":…
-
1
votes1
answer245
viewsproblem reading external NODEJS Json
I have a problem to read an External Json but I can not identify, I have checked the json and it appears correct. that would be Json…
-
1
votes1
answer1133
viewsIF-Else Reactjs Json condition
In the code developed in Reacjs below, it returns from a field containing a "displayPortraitLeft" key with values ranging from true to false, and depending on the value (true/false) obtained, I…
-
1
votes1
answer78
viewsCapture only line
I have a table created in array, and the modal button opens a table for selection of units of weight / measure, but when the selection is captured fills the whole table as in the photo below. How do…
-
1
votes2
answers850
viewswebservice php+json
Hello! I would like help to integrate with webservice via url, for example: $list_result = '{"titulo": '. '[{"id":$id_primary}'. ']}'; $json = json_encode($list_result); //echo $json; //API Url $url…
-
1
votes2
answers662
viewsHow to transform a json object array into a list of objects in c# using Json.NET
I’m starting to learn c# and I’m picking up to do this task, take an array of objects from a json and turn the elements of that array into objects of a specific type and put them in a list. Create a…
-
1
votes0
answers101
viewsHow to send ID saved in variable in Json return
I’m making a insert using a class but not being able to rescue the last id registered, need to save this id in a return variable json because I need it to make a new record, what I have is this:…
-
1
votes1
answer365
viewsJSON created with PHP pass to JAVASCRIPT
PHP reads a CSV file and generates a JSON require __DIR__ . '\autoload.php'; use League\Csv\Reader; $arq = __DIR__ . '\arquivos\201111019050.csv'; $reader = Reader::createFromPath($arq, 'r');…
-
1
votes1
answer2998
viewsError deserializing a Json I receive from the server
Cannot deserialize the Current JSON array (e.g. [1,2,3]) into type 'Gnaritas.Coletor.Templates.Fieldfieldcollection' because the type requires a JSON Object (e.g. {"name":"value"}) to deserialize…
-
1
votes1
answer6168
viewsError in Webservices Json C# "Unexpected Character encountered while Parsing value: <. Path '', line 0, position 0."
Hello, I’m getting an error in the execution of my code, in another application the same code works, I’ve changed the using, but it doesn’t work. public String CriaPeca(String token, String ip,…
-
1
votes1
answer4041
viewsHow to pass Viewbag values to a Javascript Function in an ASP.NET MVC application
I have the following Actionresult Controller in my application. In this Actionresult I have two Viewbag that captures a Longitude and Latitude values from a Google API. The values arrive perfectly…
-
1
votes2
answers124
viewsPHP Web Service with INNER JOIN
I am creating API for consumption in Ionic applications, but I’ve been working for 2 weeks on one of these api’s, where I link data in more than one table with Inner Join. I tried to do as in my php…
-
1
votes0
answers656
viewsProblem using @Jsonignore Spring Boot
I have a @Manytoone relationship between Manga and Author, where Many Manga can have an Author and an Author can have many Manga. I would like to list all the Manga with each Author, and when…
-
1
votes0
answers833
viewsError consuming JSON: "json Parsing error value <!doctype of type java.lang.string cannot be converted to jsonobject"
I’m trying to consume a JSON in my application. I created a Splashscreen and in it I am trying to download the data from the file JSON and send to my Masteractivity, where, then, I’m going to build…
-
1
votes1
answer272
viewsAngularjs reading JSON positions
I have a JSON of states and cities as follows: { "estados": [ { "sigla": "AC", "nome": "Acre", "cidades": [ "Acrelândia", "Assis Brasil", "Brasiléia", "Bujari", "Capixaba", "Tarauacá", "Xapuri" ] },…
-
1
votes0
answers81
viewsProblem when climbing Web Api in Asp.net core using Entity framework with postgresql
Hello! So, I already checked my classes in the bank, I successfully mirrored and started to assemble the functionalities of my webservice. With that, I came across the following mistake:…
-
1
votes1
answer254
viewsCompressing and organizing Json
I have been studying Json recently to use in my projects to replace database in some cases, in my tests I found a doubt. depending on the project I may end up repeating some values in certain items…
-
1
votes0
answers45
viewsSearch MYSQL with PHP and JSON
I have a table in mysql database that has a field genre with that amount: [{"id": 2, "genre_name": "action"}, {"id": 1, "genre_name": "comedy"}] and would like to display all lines containing the…
-
1
votes1
answer615
viewsUse AJAX return in other functions
I have 2 functions: A function 1 returns a JSON via AJAX and lists the data in an HTML table dynamically, until then everything works. The function 2 need to manipulate the same data, however, I did…
-
1
votes1
answer78
views -
1
votes2
answers564
viewsConsume Json Vuejs2 with Axios
I’m trying to popular a list with a JSON, but I’m having problems. I can only make the list by placing Inline in the array, but there is only one item in the list and I cannot make it populated with…
-
1
votes1
answer768
viewsSort php array values!
I have a comeback JSON. "members": [ { "name": "Drogo", "role": 3, "donations": 278, Where do I use the foreach to travel it! foreach ( $CMAMBERS as $e ) { echo "nome: $e->name<br>"; } I…
-
1
votes3
answers105
viewsHelp to understand localStorage.js
I would like a help to enter the localStorage in javascript. Objective: Make a function to save information in the input identical to wordpress, example: In the third print is what I want, if he…
-
1
votes0
answers293
viewsAngular 4: Error running HTTP POST in JSON File: Not Found 404
Bom Dia Amigos, I am learning Angular, using version 4.4.6 with Angular-Cli and am having problems using http post service. First I created a date folder where I stored my json file and added it in…
-
1
votes0
answers92
viewsStore the string size of an array
Good morning, you guys, I am trying to take the size of a string from an array to store in a variable so that I can then use an "if". I used var_dump() where I can know the size of the string but do…
-
1
votes2
answers867
viewsHow can I echo a JSON in PHP?
Look I’m doing some tests with an api where I’m getting this json: [ { "id": "bitcoin", "name": "Bitcoin", "symbol": "BTC", "rank": "1", "price_usd": "18880.8", "price_btc": "1.0", "24h_volume_usd":…
-
1
votes0
answers893
viewsHow to correctly read a JSON API and create list?
In Python3 I made a program to read an API (from the House of Representatives) and get the data in JSON import requests import pandas as pd url =…
-
1
votes1
answer124
viewsShow data from a JSON in a listview
namespace Monitorizacao.UI.Pages { public class Post { public int Id { get; set; } public string Title { get; set; } public string Body { get; set; } } public partial class TestAPIPage : ContentPage…