Questions tagged as 'json'

2
answers

webService php + json

Hello I would like help with integrating with webService via url, for example: $list_result = '{"titulo": '. '[{"id":$id_primary}'. ']}'; $json = json_encode($list_result); //echo $json; //API Url $url = 'https://local-que-devo-enviar...
asked by 07.11.2017 / 16:41
1
answer

Insert JSON file into the database via PHP

I have a JSON file that I need to insert the information contained in it into the database. JSON file: {"retorno":{"produtos":[{"produto":{"codigo":"AAAAAA","estoqueAtual":20}},{"produto":{"codigo":"BBBBBB","estoqueAtual":10}}]}} How I'm...
asked by 26.10.2017 / 21:38
2
answers

Error when picking up JSON elements

Talk to people, blz? I'm having a problem when receiving the JSON response from Ajax, I can not populate all the states in the select. Although it is inside a for it only takes the last element, ie it runs through all states but only stores the...
asked by 27.10.2017 / 21:58
1
answer

HTTP connection with server does not return JSON data

Hello, I'm trying to get the data from a query via HTTP, but it's returning this error: org.json.JSONException: End of input at character 0 of The code I have is this: private class AsyncFetch extends AsyncTask<String, String, String...
asked by 01.10.2017 / 23:42
1
answer

res.json NodeJS / Express

I have a cruel doubt on nodeJs / Express, I'm pretty new to the language but what I need is to pass the id on a route so that it executes and returns a query. I want to do in fragmented files, so I have a Routes file (with all routes) an API...
asked by 06.10.2017 / 22:27
3
answers

How to check if a select is null

People, I have this code that pulls server info try { $conecta = new PDO("mysql:host=$servidor;dbname=$banco", $usuario, $senha); $consulta = $conecta->prepare('SELECT * FROM tb02_cardapiosem WHERE tb02_diasemana=' . $data); $c...
asked by 12.10.2017 / 15:00
2
answers

Popular inputs with Json file in jQuery

I would like to know how to fill some inputs through data from a json file with jQuery. Follow the data in Json: {"data":[ {"id":"0","lNeg":"","cnpjToma":"02.558.157/1001-62","nDoc":"00121961","nPed":"5100484612","dtEmis":"01/11/2016","dtVe...
asked by 08.09.2017 / 17:17
1
answer

Read json with the GSON library

How do I read this code with the GSON library? { "profissao": { "jornalista": [ "escritor", "legal", "fotografo" ], "programador": [ "focado", "exatas",...
asked by 28.08.2017 / 15:28
1
answer

Ajax Async: true, I need an example

Hello, I just want an example for study purposes. I want the page to update automatically, to make future chat, the page update asynchronously and also to refresh real-time page, where other people on the computer can see the data at the same ti...
asked by 25.08.2017 / 23:46
1
answer

Order validation via jQuery, Json

I want to make a function that the customer type his request it is checked if it exists in the bank or if it is an invalid request. And I want to return this via Ajax, but I never messed with Ajax, would anyone know how to do it? Function...
asked by 21.08.2017 / 22:59