Questions tagged as 'json'

4
answers

Does not show the result of the query

I'm trying to make a query that shows all the results of a table with a couple of parameters and then encode them in json, however in the query I do not show the results of the table, and it only brings me back a single result, which can be my m...
asked by 23.08.2017 / 16:12
1
answer

Json poorly formed by PHP function

I'm putting together a json in a php function and taking it in js gives me an error when wanting to parse it. When I validated it on a page, it says it's invalid, by deleting it:    messan "[]" I can validate it correctly. Some idea...
asked by 22.08.2017 / 15:15
2
answers

Repeated Data in an Array

I have the following code: $lineas=""; $fechaAnt=""; for ($l=0; $l < count($dat); $l++) { if($dat[$l][0]!=$fechaAnt || $fechaAnt==""){ //Si tu fecha es diferente a la anterior o es igual a vacio porque es la primera vez $...
asked by 11.08.2017 / 18:01
1
answer

First steps with FIWARE

I am trying to make my first steps with FIWARE and I am not able to make a correct POST request with this example: POST http://localhost:1026/v2/entities/ Headers: { 'Content-Type': 'application/json', 'Fiware-Service': '...
asked by 09.08.2017 / 22:02
1
answer

PostgresSQL add elements

I need to form the json in this way in PostgreSQL. ubi_json json; FOR i IN 0..7 LOOP ubi_json = ubi_json || to_json('valor',i); END LOOP; Error comes out: Error : no existe la función to_json(unknown, integer) I need this:...
asked by 06.08.2017 / 17:41
1
answer

Retrieve values from my table?

I want to save in a variable the data of my table for example my json brings me 2 fields, name and date. And I want the first name data to save it in a variable: example:  var nom = 'the first name record';  var fech = 'the first date re...
asked by 26.07.2017 / 22:34
1
answer

Delete an element from a JSON object - PHP

I have a JSON file like this one: [ { "NAME": "Algo", "ALIAS": "Algo" }, { "NAME": "Otro", "ALIAS": "Otra cosa" } ] I need to delete the second element with the index number already (there are many more elements (urls)). How I d...
asked by 31.07.2017 / 01:09
1
answer

swift 4 decoder STRUCT MAPPING JSON

I have this json structure and what I want to do for now is just print it on the console, I'm learning to map a json my struct: struct Buscajson: Decodable { let status: Int? let mensaje:String? let empresas: emp...
asked by 24.08.2017 / 00:57
0
answers

Problem with json_encode php and ajax

I'm using CodeIgniter where I have a driver that returns an array in json format, and I want to receive it from jquery ajax, but I get this error: Fatal error</b>: Call to undefined function json_encode() It also turns out tha...
asked by 18.07.2017 / 21:55