Questions tagged as 'json'

2
answers

Is it a good idea to use JSON as a database?

I'm doing a mobile app project. Using Python and Kivy. My project has three main classes to be saved in a database (it's an application for ticket sales): Tickets, Events and Users. Searching, I have seen that JSON at the beginning is quite e...
asked by 23.08.2018 / 00:45
1
answer

Read Json Object with PHP

Good evening I'm trying to read the following json with php: { "kind": "customsearch#search", "url": { "type": "application/json", "template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startI...
asked by 11.05.2018 / 03:45
1
answer

Transform serialized inputs into JSON

In a datatable there are some columns with inputs. If I click the Submit button I will serialize the inputs of the lines that are marked checkbox. The return of the serialize: 'id=1596&inputCodPag=dwad&inputDtPagto=22-03-2018&input...
asked by 19.03.2018 / 17:09
2
answers

Create associative array with other arrays in PHP to use as return JSON

As an example, I'm going to use what I've been given quite simply, this Array will be obtained with data coming from a query of BD : $S1 = [[0,100], [1,200], [2,700]]; $S2 = [[0,700], [1,300], [2,400]]; $Label = [[0,SPI], [1,MVA],...
asked by 22.02.2018 / 13:13
1
answer

Ajax request does not work

I have 3 files: newDose.php: <label for="busca">Buscar cidadão:</label> <input type="text" class="form-control" id="busca" placeholder="Digite parte do nome ou o CNS" onkeypress="busca(this.value);"> <br/>...
asked by 22.02.2018 / 13:19
1
answer

Turning the HttpResponseMessage return into JSON

My API currently returns the bank values in JSON. If no value is found, I return a HttpResponseMessage with error code 404. However, when testing the request, only the message contained in Content is displayed. I would lik...
asked by 14.02.2018 / 18:44
2
answers

How to declare an array in javascript that will receive an array of JSON

Given the interface: export interface Pergunta { id: number titulo: string opcoes:[] } I want the array array to receive its array of options: { "id": "1", "titulo": "Qual o seu comportamento em relação aos seus invest...
asked by 13.03.2018 / 20:16
1
answer

doubts with jsPdf - definition of columns

I have the following json { "MedPaciente": [ { "ProdutoModel": { "LaboratorioModel": { "id_laboratorio": 7951, "nome": "BOEHRINGER INGELHEIM", "data_cad": "28/12/2017",...
asked by 17.02.2018 / 16:45
1
answer

Deserialize List JSON C #

In my program I make a GET and get the following: {"totalcount":2,"count":2,"sort":1,"order":"ASC","data":[{"2":8283,"1":"Teste","12":6,"15":"2018-03-29 11:30:04","19":"2018-03-29 15:13:18","10":5,"4":981,"5":981,"8":null,"159":0,"7":"Others...
asked by 02.04.2018 / 12:34
3
answers

Object reference not set to an instance of an object. - Json

Follow the code below: public class Name { public string type { get; set; } } public class Items { public string type { get; set; } } public class Hobbies { public string type { get; set; }...
asked by 07.04.2018 / 01:48