Merge pull request #1270 from bachp/patch-3

Fix JSON Array documentation
This commit is contained in:
Aleksandar Fabijanic 2016-05-12 09:11:37 -05:00
commit 75e4bbaf91

View File

@ -47,7 +47,7 @@ class JSON_API Array
/// Var result = parser.parse(json); /// Var result = parser.parse(json);
/// Array::Ptr arr = result.extract<Array::Ptr>(); /// Array::Ptr arr = result.extract<Array::Ptr>();
/// Object::Ptr object = arr->getObject(0); // object == {\"test\" : 0} /// Object::Ptr object = arr->getObject(0); // object == {\"test\" : 0}
/// int i = object->getValue<int>("test"); // i == 0; /// int i = object->getElement<int>("test"); // i == 0;
/// Object::Ptr subObject = *arr->getObject(1); // subObject == {\"test\" : 0} /// Object::Ptr subObject = *arr->getObject(1); // subObject == {\"test\" : 0}
/// Array subArr::Ptr = subObject->getArray("test1"); // subArr == [1, 2, 3] /// Array subArr::Ptr = subObject->getArray("test1"); // subArr == [1, 2, 3]
/// i = result = subArr->get(0); // i == 1; /// i = result = subArr->get(0); // i == 1;