Questions tagged as 'json'

1
answer

jsonarray adding and overwriting

I am creating a game and I am in the part of creating monsters and I need a json file to save the monsters but when I create a new monsters it writes on top of what already exists as I can only add a new monster. Code: import org.json.*; im...
asked by 01.12.2017 / 15:32
1
answer

How to send JSON as a post response

I have page A with the following code to send a POST to page B: function curlPost($url, $dados) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($dados));...
asked by 17.11.2018 / 16:35
1
answer

Use kivy urlRequest

How exactly do you use kivy's UrlRequest? In case I wanted to download a page that returns a json file. Using the python requests library I can do this easily, however at the time of running the application on the android mobile phone, it gets m...
asked by 31.12.2017 / 01:33
1
answer

Uncaught SyntaxError: Unexpected token in JSON at position 0

In my html I'm using a Javascript to try to retrieve a saved Json object in the localStorage. I'm using Google Chrome. First I get the value of the "name" attribute of my Json object that is in the localStorage, via form, and then execute the...
asked by 23.04.2018 / 03:41
1
answer

JavaScript object does not create new keys

I'm using MongoDB and it returns me all the right data but when I want to add a new key it just does not create. exports.validaLogin = function(req, res) { login.find({ "nome": req.query.usuario },function (err, logins) { if(err) { re...
asked by 01.11.2017 / 20:13
1
answer

How to serialize a color with Json?

I have the following code, in which I am trying to serialize and deserialize a class that has 2 variables Color : static void Main(string[] args) { Color cor = Color.FromArgb(255, 255, 0, 0); Color cor2 = Color.FromArgb(255, 0, 0...
asked by 20.08.2017 / 17:57
1
answer

HttpClient - WebException: The underlying connection was closed: The connection was unexpectedly closed

I created a very simple C # console application to test connection in an API, but I can not send the request. I tried with other APIs and they worked, but this specific one I can not. It would be a query in the CartolaFC API (it's commented on i...
asked by 24.06.2017 / 18:09
1
answer

How to return values from two distinct tables php

I am a beginner and wanted to create a function that would return me from the name of the cpf, user and password of the person in the system. Where the name and cpf fields belong to the users table and the user and password fields belong to user...
asked by 22.09.2017 / 21:18
1
answer

Reorder list of products with Javascript?

I would like to know how to change a list of products. I have the products in Json , and I would like to implement a function to reorganize the products by Mais recente, Maior ou Menor preço. JSON "produtoUm" : [...
asked by 20.04.2017 / 18:33
1
answer

Read Json without having to "know" the JAVA keys

The problem is that I need to inform the professions and I wanted the json reading to be automatic without having to report ocup[1] = "jornalista" . I would like the json reading to be automatic. { "profissao": { "jornalista": [...
asked by 28.08.2017 / 13:29