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
votes3
answers496
viewsList json object returned by php
I need a help, I am developing an app with HMTL5, JS, CSS that lists a pizza menu. My PHP returns an array that I use the json_encode() to be available in JSON format. So far everything then I have…
-
2
votes0
answers64
viewsJson connection returning null and error-free in the json_errors variable
Code being used in a php in the /root folder: <?php $jsoncontent = file_get_contents('https://xx.xxx.xx.xxx/v1/API_operation'); $jsoncontent = utf8_encode($jsoncontent); $data =…
-
2
votes2
answers3587
viewsCatch json values in Curl return
I have three different servers: server A, server B and server C. Where A registers users and stores personal information. I am trying to log in from B and C servers in A using Curl. I need to return…
-
2
votes1
answer299
viewsRemove last json item with jQuery
I have json messe format: { "indice1":['nome1', 'nome2'], "indice2":['nome1', 'nome2', 'nome3'] } What I want is when the user clicks on the delete button it deletes the last json item. In the case…
-
2
votes1
answer1528
viewsJSON and multiple lines
I’m building a file JSON where I intend to add several lines, as shown in the code exemplified below: [ { "Numero":"0001", "Textos":[ { "letra":"Meu Jesus maravilhoso és, minha inspiração a…
jsonasked 8 years, 1 month ago Rondinelly Ramos Araújo 21 -
2
votes2
answers316
viewsCompleting form with AJAX and Mysql
I need to complete a form, according to the user’s demand, with Database information (Mysql). Example: I have the fields "Institution", "Course" and "Period". For the user, first, will appear only…
-
2
votes1
answer242
viewsDELETE Ajax request on a Floodlight SDN controller
I have a function in my Javascript that makes an Ajax request to the REST interface of a Floodlight controller. function excluir(nome) { var jsonExclui = ("{" + '"name": "'+nome+'" }');…
-
2
votes2
answers1001
views -
2
votes1
answer1469
viewsAs popular select with 2 json parameters
I’m making a form, and I didn’t find anything like it in the research I did. I have the code http://jsfiddle.net/rubensoul/xdmz35oy/3/ I’m getting popular them normally, When selecting a date he…
-
2
votes2
answers5761
viewsAngularjs ng-options: Use object property as value instead of array index
In the code below, Angularjs ng-options renders the value but records the position in the array and not the value. I get the following json: [{"iduniforme":1, "nomeuniforme":"Uniforme 5 itens",…
-
2
votes2
answers2217
viewsDynamic checkbox list in Angular and JSON API
I’m having trouble rendering dynamic checkboxes with JSON API response. Are 2 ng-repeats : Bringing the list of existing categories into the dataset, and; ng-model with the list of chosen…
-
2
votes1
answer946
viewsHow to change the value of an object in python . json
how do I change the value of an object in python . json (without rewriting it all)? Ex: { "Nome": "Henrique Antônio de Oliveira" "Cidade": "São Paulo" "Estado": "São Paulo" "Idade": "23" "Número do…
-
2
votes1
answer836
viewsHow to use JSON on Asp.net MVC
I’m a beginner in Asp.Net MVC, and I’m developing an application that manages Courses and on my screen of enrollment I’m trying to do a validation that case the pupil is already registered in a…
-
2
votes1
answer1348
viewsPass a List as parameter in Restful Java web services
Could someone explain to me how to receive a List as a parameter in a Restful Java webservices ? I’ve searched a lot of places, but I still can’t figure it out. Thank you in advance ! The code below…
-
2
votes2
answers56
viewsIs there a way to transform a string as a path?
var sql = { datatypes: { integer: { INT: { mysql: 'INT' }, SMALLINT: { mysql: 'SMALLINT' } } } } //…
-
2
votes1
answer229
viewsSend more than one JSON file in a single AJAX request
I’m requesting two JSON files by Jquery’s getJSON function. I’m trying to send them through AJAX but I’m not getting through. I did the following: var data = '[{"agents": '+agents +', "projects":' +…
-
2
votes1
answer163
viewsAngular in PHP page read an API generated in php
I’m talking about this example: <div ng-app="myApp" ng-controller="customersCtrl"> <table> <tr ng-repeat="x in names"> <td>{{ x.Name }}</td> <td>{{ x.Country…
-
2
votes1
answer2635
viewsCheck if a value is inside an array
would like to do the following: User inserts their zip code and a field input and the value that he entered within this field wanted to compare whether it is in the CEP range (01000 to 19999) of the…
-
2
votes1
answer94
viewsIs there a difference between saving settings to dotEnv, JSON or INI?
To save sensitive application data, it is recommended to save in dotEnv or I can save in any other format where the file is not in the public directory? I see many talking about dotEnv, I wanted to…
-
2
votes2
answers1891
viewsjson search with ajax in specific field
How to search for data in a JSON with AJAX ? I want to search a JSON field named tag and show another field (title and url) in a div. HTML: <div class="Minimizado top-menu-invisible hidden-mobile…
-
2
votes2
answers1166
viewsHow to return a query in JSON format with extra values and custom Keys?
I want to return the result in JSON following this format: {"cadastros": [ {"id": 1, "STATUS": true, "pessoas": [], "podeEscrever": true}, {"id": 2, "STATUS": false, "pessoas": ['Maria', 'Ana'],…
-
2
votes1
answer1015
viewsReal Time Notifications with javascript
I’m building a Java application that should show real-time notifications on the screen. A teacher requests a reservation; Reservation data is stored in a json object (or in a request table); At the…
-
2
votes1
answer1038
viewsHow to load JSON in Mysql, including JSON specific fields
I wonder if someone could help me with a question that’s been slaughtering me? First, I am trying to upload this JSON to Mysql { "business_id": "fNGIbpazjTRdXgwRY_NIXA", "full_address": "1201…
-
2
votes1
answer524
viewsUsing json to copy data (Django)
I thought better, and I think I’ll use json. def entry_detail_json(request, pk): data = Entry.objects.filter(pk=pk) s = serializers.serialize("json", data) return HttpResponse(s) But being on the…
-
2
votes0
answers64
viewsFilenotfoundexception being launched in Twitter search - Java
I have an algorithm that does a search of old tweets on Twitter between two dates. My goal is to return all tweets. The code was as in this question posting (may serve as a parameter) a few days ago…
-
2
votes1
answer190
viewsHow to show connection errors in Htmls with a JSON?
I was developing an HTML that accessed a JSON file. When, out of nowhere, the internet fell off my house and I ended up thinking about this question: Is there a way to catch a connection error and…
-
2
votes1
answer244
viewsIs there a session variable in Json [web service]?
Well, the mini world of my project is as follows:: I am creating an application, where I will consume a database by the json method, where I validate the logged-in user, however when I am asked to…
-
2
votes2
answers547
viewsParse with quotation marks in the middle
I have in the database a column of the type varchar that takes a JSON. That column is the description of a company, but in 4 languages. The logic I have is the following: { "PT":"Descrição com…
-
2
votes1
answer425
views -
2
votes2
answers451
viewsTransforming Image into Base 64
I am transforming an image I send by camera in Base64 but the image is all black, I do not know what is wrong, follows below my code app.encodeImageUri(mediaFiles[i].fullPath); //Aqui envio o…
-
2
votes2
answers701
viewsJson parse array
I have the following answer { "users":[ { "id":1, "Name":"Rafael", "label":"teste" }, { "id":2, "Name":"Carlos", "label":"teste" } ], "relations":[ { "id":1 }, { "id":2 } ] } And I want to armanezar…
-
2
votes1
answer298
viewsRead Json in PHP?
I have the following code in my PHP: <?php $url = "https://api.cartolafc.globo.com/mercado/destaques"; $response = file_get_contents($url); $jogadores = json_decode($response,true); It should…
-
2
votes1
answer145
viewsCustomize Json consumption - Web API
I have the following information on Json: [ { "$id": "1", "Cditemcontacli": 1.0, "Cdcontacli": 1.0, "Descricao": "Produto 1" }, { "$id": "2", "Cditemcontacli": 2.0, "Cdcontacli": 2.0, "Descricao":…
-
2
votes1
answer95
viewsProblem with JSON - Python3.4
I am working with the Buscapé API in order to get information from some products on the site, the problem is that I cannot manipulate one of the values of the returned json. Below follows some…
-
2
votes1
answer148
viewsSending post to Actionresult via knockout
Speak people, next: I’m trying to send one post using the ko, for a method ActionResult of my controller instead of a JsonResult as usual. When debugging the project it enters the ActionResult but…
-
2
votes1
answer1762
viewsAutocomplete: JSON + PHP
With the codes below my output coming after typing "Al" is only "Albania", and the same comes duplicated in the autocomplete. The result coming in Chrome console is: >…
-
2
votes1
answer225
viewsReference or embed documents in mongodb and couchdb
I’m thinking of creating referenced documents instead of embedded because I have a database where a plane has flights and flights have airports. Someone experienced enough to tell me the best…
-
2
votes2
answers321
viewsWrite a new html with js or jquery
I wanted to know if there is a way to present a new html page using a string containing all the content of the new page that I am trying to present, the code is below:…
-
2
votes1
answer205
viewsHow to place a class within a JSON
Does anyone know how to put a class inside a JSON file? I need to save a class within a JSON file, however, it returns that this file is not serializable. Does anyone know how I can get this class…
-
2
votes3
answers9219
viewsjson_encode returning "Malformed UTF-8 characters, possibly incorrectly encoded"
I’m using the Laravel 3 in a given system. Sometimes I’m having a problem with the json_encode, returning false in some cases. In this code, I upload an external page and, with the DomDocument, make…
-
2
votes1
answer470
viewsUsing JSON in c# and adding points in GMAPS
Good morning, everyone, I’m developing a C# web application that uses GMAPS to add comments to addresses. I have a page on which the user inserts comments (and the page captures latitude and…
-
2
votes1
answer1603
viewsError while listing Data via Json
I’m wearing a method to return an object of the type JSON but is not listing the information: Man Controller public ActionResult GetDados() { int codigoVenda = 2; try { SistemaDBEntities db = new…
-
2
votes2
answers909
viewsGenerate HTML elements via Javascript
I need to create a code that after passing some parameters it generates a graph similar to the image below, I thought of creating a table for each activity. Does anyone have any tips, or do you know…
-
2
votes2
answers512
viewsJSON to XLS in java
Is it possible to turn a JSON into XLS with java? I’ve done an algorithm that writes JSON to CSV, but not XLS. If you can post libraries or examples.
-
2
votes2
answers796
viewsHow to put a json code in textarea html?
I am developing a page that displays snippets of code in JSON in a textarea, but I have seen on some sites that there is some kind of plugin for this type of display as in the "Errors / Exceptions"…
-
2
votes1
answer118
viewsHelp in passing a jsFiddle code to an HTML file
I have a code in this jsFiddle which I changed, but now I’m having trouble passing it to an HTML file. My code: <!DOCTYPE html> <html lang="pt-BR"> <head> <meta…
-
2
votes1
answer381
viewsHow to deserialize JSON with C#
I have this JSON [{ "new_as_cod": "0010955", "as_nome": "NAME", "as_cpf": "1212121212", "as_email": "[email protected]", "as_cep": "88.025-200", "igr_nome": "1\u00aa IGREJA BATISTA - FLORIANOPOLIS",…
-
2
votes2
answers1562
viewsImport JSON to Database
I have a json file, and I’d like to import it into a database. Is there any way to automate this process? There is no preference for database, but if you had any function for Postgresql would be…
-
2
votes0
answers56
viewsSort by deep JSON column
I have a column called data, which has, for example, this JSON [{"name": "unit", "value": "2", "validator": ["required"]}, {"name": "name", "value": "teste", "validator": ["required"]}] I need to…
-
2
votes1
answer222
viewsTake json element with PHP
I made a print_r() of a json result that gave the following: stdClass Object ( [status] => 1 [resultado] => stdClass Object ( [BUSCA_BIN] => stdClass Object ( [BUSCA_BIN] => Array ( [0]…