Fix typo in example (#3894)

using a dereference operator does not work here
This commit is contained in:
Niketin 2023-01-24 08:41:40 +02:00 committed by GitHub
parent ed7aface46
commit b941a20b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ class JSON_API Array
/// 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->getElement<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;
/// ///