Test that JsonArray can contain doubles

This commit is contained in:
Benoit Blanchon
2014-10-05 15:02:40 +02:00
parent 21259bc61a
commit 99a785179d
4 changed files with 34 additions and 14 deletions

View File

@ -16,16 +16,9 @@ public:
JsonValue operator[](int index) const;
template<typename T>
void add(T value)
{
JsonNode* node = createNode(JSON_UNDEFINED);
if (!node) return;
JsonValue jsonValue(node);
jsonValue = value;
addChild(node);
}
void add(const char* value);
void add(double value, int decimals=2);
void add(int value) { add((long) value); }
void add(long value);
};