From e278e4f8956858deb4d6a0dfb93bf09f06cf3bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Thu, 28 Apr 2016 08:05:49 +0200 Subject: [PATCH] Updated API Reference (markdown) --- API-Reference.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/API-Reference.md b/API-Reference.md index b798b80..dcc129b 100644 --- a/API-Reference.md +++ b/API-Reference.md @@ -821,6 +821,47 @@ const char* value2 = object.get("toto"); // returns NULL ``` +### 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 + +```c++ +size_t measureLength() const +``` + + + +### JsonObject::measurePrettyLength() + +##### Description + +Gets the length of string produced by `JsonObject::prettyPrintTo()`. + +##### Return value + +The number of characters in the JSON string that would be generated by `JsonObject::prettyPrintTo()`. + +It doesn't include the zero-terminator. + +##### Signature + +```c++ +size_t measurePrettyLength() const +``` + + ### JsonObject::operator[] ##### Description