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

+12
View File
@@ -1,2 +1,14 @@
#include "JsonArray.h"
#include "JsonValue.h"
JsonValue JsonArray::operator[](int index) const
{
for (JsonNodeIterator it = beginChildren(); it != endChildren(); ++it)
{
if (!index) return JsonValue(*it);
index--;
}
return JsonValue();
}