Test that JsonArray can store booleans

This commit is contained in:
Benoit Blanchon
2014-10-05 15:04:17 +02:00
parent 99a785179d
commit f0754aed53
3 changed files with 12 additions and 2 deletions

View File

@ -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);