0

So I know JSONPATH can be used to select multiple values from a json response with an orcalize query like in the below example

http://app.oraclize.it/home/test_query#VVJMKEdFVCk=:anNvbihodHRwOi8vc2FtcGxlcy5vcGVud2VhdGhlcm1hcC5vcmcvZGF0YS8yLjUvd2VhdGhlcj9xPUxvbmRgb24sdWsmYXBwaWQ9YjY5MDdkMjg5ZTEwZDcxNGE2ZTg4YjMwNzYxZmFlMjIpLm1haW5bdGVtcCwgdGVtcF9taW4sIHRlbXBfbWF4XQ==

However what would the callback signature for this type of query be?

would it be like this

function __callback(bytes32 myid, string[] result)

or would it remain as before and the array of responses is actually just one big string?

0

Oraclize currently only supports returning a single string type, which has been found to be the most flexible one with current limitations. However, with the potential release of an ABI decoder within Solidity, it would allow users to request multiple values and have those values be any combination of types.

You could consider sending back a JSON string, and then parsing it on-chain. There are some JSON parsing libraries out there.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.