Questions tagged as 'json'

1
answer

How to define a data structure in Json, with the name of the object at the top of the structure?

I'm working on json and I really need to get this structure: { "Identidade": [ { "numero": 1704, "numeroFinal": 1804, "id": 28 }, { "numero": 1806, "numeroFinal": 1905, "id": 28 }, { "numero...
asked by 19.09.2017 / 12:38
1
answer

Read using data from an external json file without jQuery

I have an external json file and I want to use its data in several functions that I have, but I can not, only when I put all the json inside a variable. I researched and ended up finding this example: function fetchJSONFile(path, callback)...
asked by 15.08.2017 / 23:43
1
answer

Angular 1 reading JSON cross-domain

I'm having a little problem with angular and wondered if anyone can help me, I was asked the following task to make a shelf from the products of an external JSON (where you have all the info of each product). const API_URL = '/caminho/para...
asked by 12.08.2017 / 06:17
2
answers

I can not put element inside JSON

I have this JSON ["{\"clube\":[\"Flamengo\"]}"] , and when I run this code: $clubes = '["{\"clube\":[\"Flamengo\"]}"]'; $clubes = json_decode($clubes, true); array_push($clubes->clube, 'Santos'); return $clubes; I have this error a...
asked by 12.08.2017 / 05:37
1
answer

Highcharts - Line chart with date

Hello, I can not create a chart line using the Highcharts plugin, where the X axis is separated by months (Jan, Feb, etc ...) and the Y axis is the number of new clients based on these months. Below is how my json is formed. [{ "newCusto...
asked by 24.08.2017 / 16:56
1
answer

java response json out of order

I'm doing an API in java to be consumed by Excel. I'm doing a select from the bank bringing the columns in the right order, but when it arrives in Excel comes in a crazy order. I also made a method with: Class.forName("className").getDeclar...
asked by 24.08.2017 / 22:25
1
answer

Convert a JSON String to an Array of the JAVA Object

Hello, I can not do the conversion, my string is coming like this. { "empresa1": { "category_id" : "Item 1", "id" : 1, "imagePath" : "imagem", "name" : "empresa 1", "short_desc" : "desc da empresa 1" }, "empresa2":...
asked by 22.08.2017 / 21:22
1
answer

Inserting float value into a JSONObject

I have the following situation, I have an object called Item , with a value variable in it. When I enter the value in the json object it changes from 1 or 2 houses after the comma to 15 houses after the comma. Ex: value is 8.9 and chang...
asked by 30.08.2017 / 20:18
2
answers

How to send via post in java an information for a php page?

I'm facing a problem that at the moment I do not know how to solve. Being straightforward, I'm having trouble sending through a java application the data in json for a page in php. Basically, I have a page in php that receives the data through t...
asked by 20.06.2017 / 21:43
1
answer

Web service long implementation period

I'm creating a webservice that queries in a DW these queries because they have aggregation functions and everything takes a bit more time than normal (something around 2 - 5 minutes), but the client does not wait for this query terminating it un...
asked by 22.06.2017 / 21:01