ArduinoJson: API Reference

JsonObject::measureLength()

Description

Gets the length of string produced by JsonObject::printTo().

This can be very handy to fill the Content-Length of an HTTP request or response.

Return value

The number of characters in the JSON string that would be generated by JsonObject::printTo().

It doesn’t include the zero-terminator.

Signature
size_t measureLength() const
Fork me on GitHub