Questions tagged as 'json'

1
answer

Add element to array Json with Gson

This is my Json file: [{"nombre":"Activo","valor": 8500},{"nombre":"Pasivo","valor":500000}] And I want to add another object to the last position of that array using Gson, I try the following: public void add(Cuenta cuenta) throws IOExce...
asked by 28.04.2017 / 05:32
1
answer

Problem with JSON login Alamofire Swift 3 iOS

I am trying to block access to the next window in my app when the server responds with a code different from 200 (ok) but I can not fulfill it. import UIKit import Alamofire class ViewController: UIViewController { @IBOutlet weak var...
asked by 27.04.2017 / 23:42
2
answers

Access JSON data (PHP, AJAX)

I have the following code which makes the query correctly in the database: <?php $serverName = "SERVIDORSQL"; $connectionInfo = array( "Database" => "bd_test", "UID" => "supervisor", "PWD" => "supervisor", "Characte...
asked by 26.01.2017 / 21:44
2
answers

Catchable fatal error: Object of class PDOStatement could not be converted to string in on line 24

I want to pass the results of the two queries in the same variable so that I can show it in a table, but I throw that error in the code, the code is as follows: <?php include("../BD-Config/config.php"); session_start(); // liste des évé...
asked by 20.01.2017 / 17:24
1
answer

filter last records

Good, I'm a little lost with this since I do not control Angular Material . I have created a table in which all the results that I currently have in JSON appear to me and I have to do a function in which I filter to show the last X recor...
asked by 11.01.2017 / 16:20
1
answer

How could I do a loop that repeats with data in Json in my case?

Good afternoon, I have a component in react and I need a json with the name and the link for the image to show that in my div . import React from 'react'; class Content extends React.Component { render() { return (...
asked by 10.01.2017 / 22:31
1
answer

WebAPI ASP.NET Error 404 when using GET / api / controller?

I have problems trying to fill a table using AJAX / JSON. To obtain the data I use as url /api/controlador . I've already added the .json extension and from what I understand, the problem is that the url that you are trying to access is...
asked by 15.02.2017 / 18:01
1
answer

Accessing nested elements in a JSON from a Django template

I have the following document JSON { "paciente": { "id": 1234, "nombre": "Pablo Andrés Agudelo Marenco", "sesion": { "id": 12345, "juego": [ { "nombre": "bonzo", "nivel": [...
asked by 29.11.2016 / 05:39
2
answers

How do I get the data of a JsonConvert.DeserializeObject (s) object to be occupied as the value of a variable?

I have the following example string in string within an application C #: string json={"success":56,"msg_error":"credenciales no reconocidas"} That I receive a web service. What I need is to take the value of "success" and assign it to a var...
asked by 06.12.2016 / 02:22
1
answer

Sort the values of a JSON file

I have a JSON file, and what I want to do is make a function in which I return an ordered list limited by 10 users (if possible, in an array, but if that is complicated, I would appreciate your suggestion). This data comes from: let points...
asked by 21.12.2016 / 11:52