mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 08:48:30 +01: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