Test that JsonArray can store integers

This commit is contained in:
Benoit Blanchon committed 2014-10-05 14:55:14 +02:00
1 parent 4c67d0579a
commit 21259bc61a
4 files changed
+23 -4

No files matched your search

+8 -2
View File
@@ -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);
}
};