mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-09-25 22:40:56 +02:00
Updated FAQ (markdown)
20
FAQ.md
20
FAQ.md
@@ -512,6 +512,26 @@ See:
|
|||||||
|
|
||||||
|
|
||||||
### Can I parse data from a stream?
|
### 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?
|
### Can I parse a JSON input that is too big to fit in memory?
|
||||||
|
|
||||||
No.
|
No.
|
||||||
|
Reference in New Issue
Block a user