forked from bblanchon/ArduinoJson
Test that JsonArray can store integers
This commit is contained in:
@ -14,12 +14,18 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
// JsonValue operator[](int index);
|
||||
JsonValue operator[](int index) const;
|
||||
|
||||
template<typename T>
|
||||
void add(T value)
|
||||
{
|
||||
addChild(createNode(JSON_UNDEFINED));
|
||||
JsonNode* node = createNode(JSON_UNDEFINED);
|
||||
if (!node) return;
|
||||
|
||||
JsonValue jsonValue(node);
|
||||
jsonValue = value;
|
||||
|
||||
addChild(node);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user