interactive-matter / aJson

aJson is an Arduino library to enable JSON processing with Arduino. It easily enables you to decode, create, manipulate and encode JSON directly from and to data structures.
http://interactive-matter.org/2010/08/ajson-handle-json-with-arduino/
566 stars 136 forks source link

How to get json from SD storage? #81

Open Linda0509 opened 8 years ago

Linda0509 commented 8 years ago

I have a json file in my SD storage. So how can I parse it ?

hotdropper commented 4 years ago

I think it would be something like:

File fh = SD.open("/file/path.json", FILE_READ);
aJsonStream stream(&fh);
aJsonObject* doc = aJson.parse(&stream);

But I'm having some weird string issues myself (which is why I'm looking in issues...) so that may not be quite right?