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
answers7594
viewsHow to use the $.ajax function date parameter
It is possible to send two JSON at the same time as the parameter value date jQuery.ajax()? Is there any way to call these two arguments, since I need to call these two json and show on screen?…
-
3
votes1
answer1004
viewsCapture value of an asynchronous function in Nodejs
Hello, I have a problem I haven’t found a solution. I have an array of values, in which I scan and for each value run function that makes a request to dynamodb and returns a JSON. This request is…
-
3
votes1
answer898
viewsPlace local Json in external Json $http Angular / Ionic
I want to pull this Json data from the Service by an External Json via $http. I found several examples plus they are not returning result to me. .service('ProdutosService', function($q) { return {…
-
3
votes1
answer278
viewsHow to create a json from my object?
I have a Product object that I can’t turn into json using json_encode: <?php class Produto { public $nome; public $preco; public $descricao; function transformarJson(){ } } ?> How can I do…
-
3
votes1
answer804
views'Load More' button duplicates or does not work AJAX/JSON
Whoa, everybody, all right? Next, I have a table that is fed with content from an external JSON file (created from PHP with data coming from DB). When opening the site, the table comes with only 2…
-
3
votes1
answer1418
viewsHow to check if JSON has this structure?
I have a json file that varies its structure { "Plan1": [ { "Sequencia": "1", "Mês de aniversario": "agosto", "Nome Completo": "Joao da silva" } ] } And you wanted to see if these indices have those…
-
3
votes1
answer339
viewsSend an object using Gson
I have the following problem: I need to send an object to my web-service, but it is not feasible to use Jsonstringer, because my class has many fields. What would be the best way to solve this…
-
3
votes6
answers12215
viewsHow to view php/mysql and Angularjs data?
I’m trying to do some tests with PHP + Mysql + Angularjs and I was stuck in a doubt of how to treat the database data with angular and send to screen, I have the following codes: con-bd.php <?php…
-
3
votes1
answer411
viewsJackson - Circular dependency object conversion
Given the classes below, we need to solve the problem of infinite recursion (cyclic dependency) and, for this, we use @Jsonidentityinfo, from Jackson 2+: @JsonIdentityInfo(scope=Parent.class,…
-
3
votes1
answer753
viewsAmount of elements in JSON
How can I find out the amount of elements of a json file through PHP. See the example of my file: [{"descricao":"Fotografia","codigo":784},{"descricao":"Filmagem","codigo":789}] I would like to…
-
3
votes2
answers419
viewsRequest loop in Angularjs 2
I am new to the use of Angularjs and decided to study based on a work project. My problem is this: I am building a base project using Angularjs 2 to consume data from Wordpress (WP) through the REST…
-
3
votes1
answer34
viewsAccess to json is returning error
I have the following json: x = { "body-json": { "id": "1" } } I’m trying to access the id this way: console.log(x.body-json.id); Turns out I can’t access the reference body-json. Can someone help…
-
3
votes1
answer62
viewsChecking the type of data received in the PHP POST
I need to find out what kind of data I’m getting in a user post. The user can provide me the data in XML, JSON HTML and text format Content-Type = text/xml / json / text / html Accept =…
-
3
votes1
answer6183
viewsHow to transform JSON into object array of a specific class, where this class has composite attributes?
I found the following problem when trying to transform a String JSON in object list. I have the following situation: I have a class Response which has some attributes, among them a list of "Post",…
-
3
votes1
answer1493
viewsRecognize a Jsonobject or Jsonarray
I’m developing an app that consumes data from a Webservice, which can return one or more records at a time. Until the moment always received a Jsonarray, made the "conversion" of it: JSONArray…
-
3
votes3
answers1866
viewsHow to Display Json in PHP
Caught a BD user via API. <?php require "vendor/autoload.php"; use Intercom\IntercomClient; $client = new IntercomClient(App_ID, App_Key); $client->leads->getLeads(['email' =>…
-
3
votes0
answers26
viewsEcho problem in '<' '>' php characters
Hello, I have the following problem, I am using an api that returns me a json array, but in some of these data comes between < >, ex: < test name > (not here worked...I had to give a…
-
3
votes1
answer457
viewsSave information to an Sqlite and then go up to a JSON with webserive
I read several tutorials on how to take a JSON and pass the information to an Sqlite, but as I do the reverse, I take the application data already saved in Sqlite and then transfer them to a…
-
3
votes0
answers238
viewsHow to attach a file using Mandrill API?
Yo, yo, y'all! I’ve been trying for two days, but I haven’t succeeded yet. I know I’m close, but I need your help. I usually take a lot of Jobs with only fixed data (front-end). So I use the API of…
-
3
votes1
answer776
viewsDelphi Web Service parameters
I have a service running in Delphi with Datasnap REST, it serves to read data and returns the query to those who requested, but now the client needs to consume this data via web passing some…
-
3
votes3
answers2951
viewsjson_encode returns nothing
What am I doing I’m pulling data through PHP with a list of cities to create a chart with Javascript, and I realized that it was not returning the data, so I downloaded the file that takes the data…
-
3
votes3
answers1746
viewsHow to list a json object to generate a txt file and download that file via ajax request?
I have an ajax request that sends a large object. That in the browser console is seen like this: Object {data: Array[4936], paging: Object} Follow the request code: $.ajax({ type: "POST", url:…
-
3
votes0
answers2038
viewsAllow a script to access a google spreadsheet and return a JSON without authentication
I was thinking of using a google Docs spreadsheet as persistence of a little application that I will develop. To do so, I made the following script in the google script editor function doGet(e) {…
-
3
votes1
answer791
viewsCascade Dropdownlist MVC 4
View: <asp:Content ID="Javascript" ContentPlaceHolderID="HeadContent" runat="server"> <script type="text/javascript"> $(document).ready(function () { $("#estados").change(function () {…
-
3
votes2
answers2344
viewsIs there any way to send image by JSON to an api?
I want to send an image (I will save it in bank), but I do not know how to send it together on POST. I’m using AngularJs: <input type="file" ng-model="user.imageProfile"> $scope.register =…
-
3
votes2
answers7656
viewsGo through all keys of a json
I want to go through all the keys of a json so I can get all of its values. Ex: { "logistics_provider": "{{lp_name}}", "shipper": "{{co_common_name}}", "invoice_key": "{{ae_identifier}}",…
-
3
votes1
answer834
viewsApplyupdates on REST with Firedac
I’m doing a project that uses a REST server with Firedac. I use a Generic function to give my select but when I try to give my ApplyUpdates it does not give any error but the data is not reflected…
-
3
votes1
answer205
viewsPrint incoming json data in jquery post
I am with the following doubt, I am making a freight calculation system the system is getting a json response in the following pattern. {"cServico":…
jsonasked 9 years, 6 months ago Clayton Eduardo Mergulhão 373 -
3
votes7
answers874
viewsExtract Array content for PHP variables
I have a Curl statement that invokes a WS. The answer to this WS is saved via: $reference = var_dump(json_decode($exec, true)); return $reference; Since I have this in one function, in the other…
-
3
votes1
answer606
viewsFind a word in a JSON result
Guys I got the following json: "results": { "collection1": [ { "prod": { "text": "COLCHÃO NAUTIKA KING SIZE" I have a search form: <form id="search" method="POST"> <input type="text"…
-
3
votes1
answer68
viewsRemove Return Header Owin Webapi
A simple return query to my REST service brings the following answer: { "Id": 1, "Descricao": "TIROLESA DE AÇO", "Und": "UND", "Fabrica": "STARROW", "Estoque": 9, "Preco": 0.39 }, But the query with…
-
3
votes1
answer674
viewsTransform JSON result to 'uppercase'
I have the following JSON (complete): { "name": "Romano Pesca", "count": 8, "frequency": "Weekly", "version": 5, "newdata": false, "lastrunstatus": "success", "thisversionstatus": "success",…
-
3
votes4
answers163
viewsDeserialize Json and place values in views
Well, what I want to do is an Activity where a Json is consumed. The problem is that all tutorials show only how to return a Json in a listview. What I want is a structure more or less like this:…
-
3
votes2
answers23455
viewsGet Data in the JSON structure with python
I want to access certain information in the JSON code below, with python: { "informacao1": valor_informação1, "informacao2": "{ dado=informação_dado }" print(arquivojson.get("informacao1")) The…
-
3
votes1
answer2569
viewsGet Response from an API that returns error 500
Next, I have an API that returns error 500 every time it violates the business rule by returning me a status and a message. We know it’s not good practice to return status 500 under these…
-
3
votes1
answer88
viewsProblem with json in Angularjs
I am developing a mobile application and am rescuing from the database a list of data. What happens and between each die always remains one , "comma" and do not know how to remove. I leave below a…
-
3
votes1
answer90
views1st becomes 1 u00aa when I enter into json
When I insert 1ª in JSON with codeigniter, when turning into string it turns 1\u00aa. $t[0]["teste"] = "1ª"; $data[0]["algo"] = $t;
-
3
votes2
answers1132
viewsWhat better way to analyze a very large json file in java?
I have a very large file in json, it has 5 gigas and it has 652339 lines, I was thinking of using the Gson library in java. I would like to know, what is the best way to analyze the file, since even…
-
3
votes2
answers1281
viewsReturn JSON to PHP
I’m making a registration system, where the ZIP code search should appear as soon as the field changes. But the AJAX return is not working. How do I return JSON to PHP? PS: ZIP search is offline…
-
3
votes1
answer216
viewsProblems with api restfull
I have an API Restfull on the local Apache server that returns a list of database users (localhost/api/users). I’m using the site Jsonlint to validate my JSON. When access via browser i take the…
-
3
votes1
answer683
viewsGroup JSON using javascript reduce()
Is there any way to group a Json using the method Reduce() of Javascript, as shown below: contas = [{id: 1, descricao: "AGUA", valor: 100, juros: 5}, {id: 1, descricao: "AGUA", valor: 100, juros:…
-
3
votes2
answers1031
viewsNull object on Deserializar Json
I request an API, which returns data in the form of JSON. Example: { "id": 8452, "creator_user_id": { "id": 46342, "name": "ADM. Suporte Comercial", "email": "*******@gmail.com", "has_pic": true,…
-
3
votes2
answers1059
viewsJSON API Callback
I have a question as to how to filter results from a API, and I wonder if anyone has had this problem before. Let’s say we have to access a API which is on a server other than ours and which returns…
-
3
votes1
answer55
viewsStreamline language to placeholder
I make a request ajax to search in the bank to bring the language configuration, type, EN, PT, and so on... I want placeholders to be changed according to the chosen language. For example, instead…
-
3
votes1
answer3111
viewsHow to read and interpret a JSON file with PHP?
I am developing a PHP application, in which I am reading a JSON file (containing several electronic tax notes) and need to save some tags contained in this JSON file in variables. I started studying…
-
3
votes2
answers818
viewsHow to count the number of occurrences of a String in a Jsonarray?
I’m trying to show the occurrence of the strings of "specialty" that are in my JSON, however, when I try to show the count of each "specialty" I cannot succeed. JSON [ { "id": "20", "medico":…
-
3
votes1
answer354
viewsHow to sum array data in json specified by date
array(10) { [0]=> array(4) { ["data"]=> string(10) "01/11/2015" ["valor"]=> int(50) ["intensidade"]=> float(37.5) ["carga"]=> int(35) } [1]=> array(4) { ["data"]=> string(10)…
-
3
votes0
answers464
viewsPostgresql Nosql and integration between relational and non-relational databases
I have been researching about Postgresql Nosql and found the concept of Key-Value Stores in some publications, also from HSTORE. I also researched the integration between Postgresql and the Spring…
-
3
votes2
answers3436
viewsHow to mount a JSON return?
I have this code, below, where I manipulate some data. But after, I need to transform into a JSON object, as the example below. <?php function mostraContasEntrada($id_empresa){ $pdo = conectar();…
-
3
votes4
answers2965
viewsconvert json to php object
UPDATE I found this answer from Soen, on the link suggested by @Pedrox, talks about Reflection, would be applicable to this case as well? As I have been told here on Sopt, i was trying to convert a…