Questions tagged as 'json'

1
answer

Use the data of a request in a global variable

I have a difficulty that I'm sure is simple for you! var request = require('request') var a var b request('https://exrates.me/openapi/v1/public/ticker?currency_pair=eth_usd', function (error, response, body) { a = JSON.parse(body) b...
asked by 30.09.2018 / 16:17
2
answers

Popular JSON dynamically with PHP / Laravel

I'm working with Laravel on a client project where I want to build a tree structure with the users registered in the system, I found a script that does this, and for that it uses JSONs to get the data. The framework it works on is as follows:...
asked by 01.10.2018 / 20:07
1
answer

How to ensure that the generated JSON does not return error to the Client?

I created a Web API that returns a JSON and has a problem similar to the JSONP: status code 200 OK and anyway returns $ .Ajax (... error: function () ...) . The client consumes the API with Nodes like this: refresh() { axios...
asked by 18.09.2018 / 14:40
1
answer

Problem in A \ u015bvagho \ u1e63a (Python3) encoding?

I'm working with wikipedia, and I'm having some coding problems. When I add such a link in my browser everything works fine: link That goes for the article with the following name: link That's the same article but the url is bein...
asked by 14.09.2018 / 19:38
1
answer

Bing API Consumption

I need to get the address of a Bing API image:    link This API returns me a JSON that contains this information I want, but I can not access it: { "images": [ { "startdate": "20181023", "fullstartdate": "20181023070...
asked by 23.10.2018 / 17:25
1
answer

How to pass vector as argument in shell script?

I would like to pass a JSON-style vector as an argument to a script. Example: #!/bin/bash vetor[]=$1 echo ${vetor[*]} i=0 for nomes in ${vetor[*]} do i=$(($i+1)) echo "Nome $i é $nomes"...
asked by 04.09.2018 / 16:48
1
answer

Array only loads last record in PHP with PDO

I'm generating the information, but only fills the last line of the query executed inside the Array, even though I'm sure it's running all the rows in the foreach. Any ideas how to populate all the arrays with all the information? <?php hea...
asked by 11.08.2018 / 21:36
1
answer

Load table via AJAX

I'm trying to load data from a table, via ajax, like this: function buscaFornecedores(id) { var url = "/Produto/BuscaFornecedor"; $.ajax({ url: url, type: 'GET', data: { id: id}, success: function (data)...
asked by 07.08.2018 / 19:47
2
answers

Help with Json to get API value

I'm trying to get only the return of a variable from this api "buy" that would be the purchase value, but when I try it returns me the whole table, could anyone enlighten me? $data = json_decode(file_get_contents("https://broker.negociecoins.co...
asked by 07.08.2018 / 22:03
1
answer

Failed to Replace ID by PHP Team Name

I'm consuming a Web Service in php, I created a function to compare championships and to return the id of the teams that will play or will play, in another url, I have the names of the teams and the ids of the teams, I'm trying to compare the id...
asked by 02.08.2018 / 13:31