JsonDocument::isNull()
tells whether the JsonDocument
is empty, i.e. if the document’s root is null.
JsonDocument::isNull()
returns a bool
that tells if the JsonDocument
is empty:
true
if the JsonDocument
is empty,false
if the JsonDocument
contains something.DynamicJsonDocument doc(1024);
doc.isNull(); // true
serializeJson(doc, Serial); // prints "null"
Result is false
DynamicJsonDocument doc(1024);
doc.to<JsonArray>();
doc.isNull(); // false
serializeJson(doc, Serial); // prints "[]"
See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4