If I assign json data to variable like that:
char json[] = "{"id":"1","status":"0"},{"id":"2","status":"1"},{"id":"3","status":"0"},{"id":"4","status":"1"}";
It works correctly.
But if I want to get it from the url so not hardcoded.
When i use:
char json[] = c;
I get following error:
C:\Users\Artur\Desktop\XlabJson\XlabJson.ino: In function 'void setup()':
XlabJson:28: error: 'json' was not declared in this scope
JsonObject& root = jsonBuffer.parseObject(json);
^
exit status 1
'json' was not declared in this scope
I tryed to use your answer to make it right but It does not work.
All of your code is where?
If you are going to read the response one character at a time, you'll need to determine a maximum number of characters that can reasonably be in a response, and allocate an array that size to store the data in. Then, read and store each character, in the appropriate position, followed by a NULL.
You were the one that suggested that client.get() returned an array of data.