Questions tagged as 'json'

1
answer

Notifications in Android application

I am developing an application and would like to know how I can generate notifications when there is a new record in the database, I am receiving the data via JSON. I was seeing Firebase, but I could not do it.     
asked by 23.11.2017 / 21:20
1
answer

Error reading JSON

I'm trying to read the JSONs from a folder and get the proper values, I already tested all the JSONs to see if they were valid. The folder with the JSONs is called 'test' for dirname, dirnames, filenames in os.walk('test'): for filename in...
asked by 10.11.2014 / 16:23
2
answers

json_encode returning "Malformed UTF-8 characters, possibly incorrectly encoded"

I'm using Laravel 3 on a particular system. Sometimes I'm having a problem with json_encode , which is returning false in some cases. In this code, I load an external page and, with DomDocument , I make a forea...
asked by 09.10.2015 / 14:36
2
answers

How to mount a JSON structure?

I have the following JSON: { "status": true, "msg": "", "frete": [ { "Transportadora": "Correios", "Tempo": "16", "Msg": "", "Codigo": "04510", "Servico": "PAC", "Valor": "131.30" },...
asked by 30.05.2018 / 18:04
1
answer

Error 415 when posting with json

I have a CREST REST application that responded in XML, however, I want to change it and get it to respond to JSON. I can do the GET in the restclient, but the POST, PUT and DELETE do not, it gives the error 415 Unsupported Media Type. What el...
asked by 27.10.2014 / 18:00
3
answers

How to convert JSON to Object and find an id (No Array) - JAVA

I have a Json that does not contain an array and I need to get some information from this Json. Follow JSON {"_status":"sucesso","_mensagem":"Impressão em processamento","_dados":{"situacao":"PROCESSANDO","protocolo":"BkVglXYWQ"}} What I'v...
asked by 21.06.2018 / 15:02
2
answers

Access an element of a JSON dynamically

I have the following JSON: [{ "posts": { "ID": 452, "post_date": "01\/01\/2016 15:30:00", "post_title": "Titulo do post" }, "postmeta": { "anexo": { "size": { "value":...
asked by 20.07.2016 / 16:24
3
answers

PHP is not displaying array result

I'm with the code: <?php $d = json_decode($output); ?> The $ output variable sends jSON data to PHP. For you to understand this variable better, I will post the return of it object(stdClass)#1 (6) { ["nome_1"]=> string(14...
asked by 27.07.2014 / 22:57
2
answers

How to save JavaScript objects in JSON format in localStorage, and then deserialize them?

I'm getting values from a form in html, then I want to use a function to get these values and create an object, making them attributes of this object. Then I want to save this object in the browser's localStorage, in Json format, so I can get...
asked by 22.04.2018 / 21:15
1
answer

PostAsync Json C #

I have the following class defined: public class Ticket { public string name public string content public int itilcategories_id } And the following code sample: static HttpClient client = new HttpClient(); client.BaseAddress...
asked by 26.03.2018 / 17:10