mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 20:42:24 +02:00
Test that JsonArray can store booleans
This commit is contained in:
@ -13,6 +13,15 @@ JsonValue JsonArray::operator[](int index) const
|
||||
return JsonValue();
|
||||
}
|
||||
|
||||
void JsonArray::add(bool value)
|
||||
{
|
||||
JsonNode* node = createNode(JSON_BOOLEAN);
|
||||
if (!node) return;
|
||||
|
||||
node->content.asBoolean = value;
|
||||
addChild(node);
|
||||
}
|
||||
|
||||
void JsonArray::add(char const* value)
|
||||
{
|
||||
JsonNode* node = createNode(JSON_STRING);
|
||||
|
Reference in New Issue
Block a user