Updated FAQ (markdown)

Benoît Blanchon
2017-01-05 21:24:39 +01:00
parent 4df2cc0b1a
commit 21b05dac63

20
FAQ.md

@@ -512,6 +512,26 @@ See:
### Can I parse data from a stream?
Yes.
Since ArduinoJson 5.8, `parseArray()` and `parseObject()` accept Arduino's `Stream` and `std::istream` as input:
```c++
JsonObject& root = jsonObject.parseObject(myStream);
```
CAUTION: parts of the input need to be copied into the `JsonBuffer`, so you need to increase its capacity accordingly.
See:
* [Examples: JsonHttpClient.ino](https://github.com/bblanchon/ArduinoJson/blob/master/examples/JsonHttpClient/JsonHttpClient.ino#L149)
* [API Reference: JsonBuffer::parseArray()](https://github.com/bblanchon/ArduinoJson/wiki/API%20Reference#jsonbufferparsearray)
* [API Reference: JsonBuffer::parseObject()](https://github.com/bblanchon/ArduinoJson/wiki/API%20Reference#jsonbufferparseobject)
* [JsonBuffer size calculator](https://bblanchon.github.io/ArduinoJson/)
### Can I parse a JSON input that is too big to fit in memory?
No.