JsonObjectStream.h
Go to the documentation of this file.
29 JsonObjectStream(Json::SerializationFormat format, size_t capacity = 1024) : doc(capacity), format(format)
bool isFinished() override
Check if all data has been read.
Definition: MemoryDataStream.h:71
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
Definition: JsonObjectStream.h:57
StreamType getStreamType() const override
Get the stream type.
Definition: JsonObjectStream.h:43
int available() override
Return the total length of the stream.
Definition: JsonObjectStream.h:67
JsonObjectStream(Json::SerializationFormat format, size_t capacity=1024)
Create a JSON object stream with a specific format.
Definition: JsonObjectStream.h:29
bool isFinished() override
Check if all data has been read.
Definition: JsonObjectStream.h:73
SerializationFormat
Describes format of serialized Json object.
Definition: ArduinoJson.h:113
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
JsonObjectStream(size_t capacity=1024)
Create a JSON object stream using default (Compact) format.
Definition: JsonObjectStream.h:37
size_t measure(const TSource &source, SerializationFormat format=JSON_FORMAT_DEFAULT)
Compute the size of a serialized Json object for a specified format.
Definition: ArduinoJson.h:131
JsonObject getRoot()
Get the JSON root node.
Definition: JsonObjectStream.h:51
size_t serialize(const TSource &source, TDestination &destination, SerializationFormat format=JSON_FORMAT_DEFAULT)
Write a Json object in a specified format.
Definition: ArduinoJson.h:159
Definition: MemoryDataStream.h:28