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
-
3
votes2
answers6191
viewsConsume API (JSON) in form fields, how to do?
Hello, my fellow programmers. I would like a help. I have to use in a project the API that contains the Table Fipe data in JSON format (http://deividfortuna.github.io/fipe/). I want my form to have…
-
3
votes1
answer128
viewsValidate by js with for each
On this screen I need to do a validation so that in each record, when the record has permission, in case it is marked bring me the record marked with it every time I edit (mark or deselect the…
-
3
votes1
answer409
viewsDropdown Cascata
My problem is passing values to controller when making an update. I can do the Cascading all right. Follow my code. First DropDown: @Html.DropDownList( "idCanalIndicadoresMassivo",…
-
3
votes1
answer435
viewsSQL Query Returned Null, Empty for JSON
I’m in trouble!! I have two tables 'user'e 'post' when I use phpmyadmin to make the following query it returns the values as I hope. SELECT usuario.nome, usuario.foto_profile, post.titulo,…
-
3
votes1
answer723
viewsHow to calculate Total via Javascript
To show the items of a sale I use a Json to show the data using this script. <script> $(document).ready(function () { var CodigoVenda = @ViewBag.CodigoVenda; $.ajax({ type: "GET", url:…
-
3
votes4
answers1837
viewsHow to use Json in an html
Hey guys? I’m new here, could you help me...is returning "Nan"! <!DOCTYPE html> <html> <body> <h1>Customers</h1> <div id="id01"></div> <script> var…
-
3
votes3
answers66
viewsHow to use a string from the database
I have the following string saved in the database.…
-
3
votes1
answer475
viewsJSON array with Angularjs checkbox
I am trying to form a JSON with what is selected by checkbox, but when I select it inserts, but when I try to remove the check in, it inserts again. The correct would be to work in that way, but…
-
3
votes4
answers3189
viewsAccess JSON with multiple JS objects
I have the following JSON [ { "id": 1, "nome": "Matheus Almeida Siccenna", "cpf": null, "matricula": { "id": 555, "empresa": 1, "unidade": 0, "descricaoUnidade": null, "curso": 1, "descricaoCurso":…
-
3
votes2
answers4232
viewsCan I use a JSON file as a database?
I’m looking to start a project but I don’t want to create a database so I wonder if I could use a file json as a database.
-
3
votes2
answers549
viewsI cannot extract the information from Json on Laravel
I get a request like this... public function store(Request $request) { return response()->json($request->all()); } That’s the way out: anexoPdfGuia: {} guiaFiscal:…
-
3
votes2
answers516
viewsHow to return a part of a string (an html element) in php?
I am making a "technical resource" to be able to return the status of the SEFAZ servers of issuing tax notes using PHP. For this, I have until now the code below: function get_content($URL){ $ch =…
-
3
votes2
answers981
viewsSerialization of a large list in JSON.Net
I’m having a problem to be able to serialize an object (a list of a class with approximately 5000 items). I am using JSON.NET to generate the Json string but it is getting the following problem, in…
-
3
votes4
answers855
viewsDeserialize JSON
I can do the POST of this information: { "Nritem": 1, "Cdprevenda": 3, "Cdproduto": 7, "Decomplitem": "", "Descricao": "Depilação", "Dtcadastro": "2015-11-27T13:53:35.120Z", "Flsituacao": 1, "Md5":…
-
3
votes2
answers719
viewsRefresh ajax mvc core page
I need to close a modal, and refresh the page, I’m doing this way: function closeModal() { $('#myModal').modal('hide'); location.reload(); } But the first time it doesn’t work, and then it works…
-
3
votes1
answer162
viewsHow to convert /Date(1533524400000-0300)/ to PHP
I receive as return from a JSON the date in this format: /Date(1533524400000-0300)/ How to Connect to a DateTime in PHP?
-
3
votes1
answer750
viewsGoogle Maps API Return markers with JSON as you move the map or zoom
points.php returns a Json with the map markers [ { "Id": 1, "Latitude": -19.212355602107472, "Longitude": -44.20234468749999, "Descricao": "Conteúdo do InfoBox 1" }, { "Id": 2, "Latitude":…
-
3
votes1
answer775
viewsHow to convert latin1_swedish_ci data to utf8_bin in php?
I got an SQL script that "mounts" 3 tables, one with country, one with states and one with Brazilian cities. The script makes the collection, of the names, in latin1_swedish_ci and I needed it to be…
-
3
votes2
answers103
viewsString deserialization
I caught the Retrofit Drivers field from the following json: { "Drivers": [ { "DriverID": 0, "Latitude": -23.642276336, "Longitude": -46.634615118 }, { "DriverID": 1, "Latitude": -23.64227916,…
-
3
votes1
answer476
viewsRead JSON and turn it into Java list
I have the following JSON: { "_status": "sucesso", "_dados": [ { "IdIntegracao": "H1xo7lOOX", "SacadoCPFCNPJ": "08896903912", "SacadoEmail": "[email protected]", "SacadoEnderecoNumero": "228",…
-
3
votes2
answers2177
viewsHow to create a JSON file from a JS?
Hello, I created a simple page where the user can define some fields. I need to implement the following function: When you click the 'Create' button, the application should generate a JSON file with…
-
3
votes2
answers58
viewsJson return from php to jquery ui
I have a php code that returns data in JSON. When it has only one value returns as it should: ["[email protected]"] When more than one value is found returns as follows: [, "[email protected]",…
-
3
votes1
answer625
viewsJavascript - Soma e Group By em Array
I would like a tip/help. I’m working with a number of files JSON, and applying filters to them as the user advances in the system. So far so good, I managed to do it quietly using the .filter(). My…
-
3
votes2
answers139
viewsDoubt Angularjs with array
How do I catch just the id and key? { "type": "champion", "version": "6.3.1", "data": { "1": { "id": 1, "key": "Annie", "name": "Annie", "title": "a Criança Sombria", "info": { "attack": 2,…
-
3
votes2
answers8938
viewsFunction calling $.getJSON() returns Undefined
I’m trying to get the data from a JSON through javascript with Jquery’s getJSON function, but it’s returning Undefined. Follows the code: $(document).ready(function(){ $("#log").append(pegaPrev("São…
-
3
votes2
answers64
viewsDoubt with string, extract data
I have the following string [{"tipo":"simnao","pergunta":"rwerwerwerewr ?","tag":"#acimadopeso","resposta":"","$$hashkey":"object:410"},{"pergunta":"werwerwerwer…
-
3
votes0
answers2708
viewsLog in to Webservice via Android
And there folks all quiet? My question is this:: I’m trying to create a login screen on Android and the registered data is in a Mysql database, to establish the communication I have a working Rest…
-
3
votes0
answers185
viewsVisual Studio Code does not recognize Rscript
Hello. I installed VS Code 1.31. I do not understand why the editor is not recognizing Rscript in "output", since in "terminal", it is recognizing R. Follow the code in Settings.json. What I can’t…
-
3
votes2
answers637
viewsHow to arrange JSON without quotation marks in index
I have the following JSON that came from a Javascript and I’m using it in PHP. I’m giving json_decode($json), but obviously it doesn’t work. Because there are no quotes in the index of every value.…
-
3
votes2
answers237
viewsIs it good practice to store a JSON object in a data-attribute?
<button type="button" class="btn btn-info btn-lg questao" data-json="" data-toggle="modal" data-target="#myModal">Open Modal</button><BR/> <button type="button" class="btn…
-
3
votes3
answers1078
viewsWhat is the best way to pass JSON per parameter in Angular JS?
I’m developing a system using angular js and php. The user inserts his Cpf and his password in a form, remembering that this user is registered in the database with his information, such as,…
-
3
votes1
answer93
viewsUnixtimestamp for Date Javascript
I am receiving a JSON in which the date is being returned in this way: /Date(1563568740000+0200)/ I believe it is Unixtimestamp, but I can not convert it to format Date javascript. I’ve tried to do…
-
3
votes1
answer353
viewsIs there any way to discover an error occurred in json_decode?
Well, PHP has one thing I sometimes consider bad: Some functions launch Warning when some error occurs, and already others, return False or Null. A case that exemplifies this is the fopen.…
-
3
votes2
answers838
viewsHow to check if server is available before request.urlopen in Python?
I have the following HTTP request code on my server in my python code: import urllib.request import json url= urllib.request.urlopen('http://ENDERECOIP/pasta/arquivo.php') x= url.read() y =…
-
3
votes1
answer1127
viewsJSON Restful API Accents
Good morning, everyone, I am creating an API for study, but I have some problems with accents. When I do a search, I have an answer of not found. Goes down a test. There would be some solution for…
-
3
votes1
answer1981
viewsConsume REST service from Angular - Return JSON
I have the following angular Function consuming a service: function GetDados($scope, $http) { $http.get('http://localhost/api/v1/index.php/dados').success(function(data){ $scope.dados = data; }); }…
-
3
votes0
answers59
viewsWhat is the best way to read a json in flutter?
I’m entering the world of development and learning Flutter to program for mobiles. The basic operation of my app will be to read a JSON from my server and play on a list in the app. Doubts: What are…
-
3
votes2
answers1392
viewsViacep does not fill in user address data (Website on the .NET platform)
I’m developing a web application on the platform. NET and I thought of making the user type the zip code of his address and automatically he would fill the text boxes with data of street,…
-
3
votes1
answer258
viewsHow to clear the data of the fields that were requested by JSON when the client is not selected?
My JSON code makes a data request through a query by the client ID, only that I realized that when it does not select the client the data of the previous request still remain in the fields. That is…
-
3
votes1
answer225
viewsDelegation of events to dynamically generated elements
I will try to be more specific. I have a list <ul>which is populated via jQuery: var $imovel = $("#lista-resultados-pesquisa"); $.ajax({ type: 'GET', url: 'imovel.json', success:…
-
3
votes1
answer347
viewsPHP - Pushing an array within another array
I’m trying to make a array within another and include more data in the array from within, how do I do it ? Follow the attempt code, it’s to generate a json: $data = array( "login1" => "login1",…
-
3
votes2
answers236
viewsHow to find a pattern to maintain the same data modeling between a JSON, POJO, and JPA object?
To facilitate the understanding of my question, follow the following example:: A POJO: public class Person { private String name; private String location; } String JSON: String json = {name:"Jose",…
-
3
votes2
answers360
viewsAndroid, how to do security in JSON?
Use Volley to make POST request to a url that returns user data... But you can see this data, creating a simple html form with action set to the url 192.168.0.101/project/user.php . Ai shows all the…
-
3
votes1
answer13619
viewsHow popular is a select with Jquery, JSON and AJAX ? (MVC)
I followed some codes I found here of how popular a selectbox, but it is not working, is it missing something ? I’m getting a list of data with my Controller. Javascript $(document).ready(function…
-
3
votes1
answer2946
viewsHow to transform this Json into an object Arraylist?
I am working on a project where I am doing a database query and need to return a list of users from the database to be listed in my application. I have the following Json line (returned by the…
-
3
votes3
answers14457
viewsTraversing Object array and accessing a value
Good afternoon guys, I’m having a difficulty, where I need to access an element of an array of OBJECTS, I’m not being able to access with foreach, or for. I need your help! The array of objects:…
-
3
votes1
answer1049
viewsHow do I edit and delete data from a json file?
I am using this code to include and list the data saved in the file "user.json" wanted Saver how do I delete this data and edits <?php $users = @json_decode(file_get_contents('users.json'),…
-
3
votes1
answer274
viewsWhen consuming an API that returns me serialized data in JSON, how do I know the data types of the properties?
I have no experience with JSON or web services consumption, but I am trying to consume an API that gives me weather data. Here is the documentation of the API I’m trying to consume. This API returns…
-
3
votes2
answers580
viewsTake JSON value and set AJAX behavior
How to take the JSON value with ajax and define the behavior, which div and which message to display, for example: If the JSON returns {"error":"true","message":"Algo deu errado"} would display any…
-
3
votes1
answer594
viewsReturn Json PHP to Ajax
Next I have a variable in php client. printing : [{"CODIGO_CLIENTE":3,"CGC":"78.079.128\/0001-80","RAZAO":"Cliente 2","FANTASIA":"Cliente 2","TELEFONE1":"+99(99)9999-9999"},…