Created
November 9, 2015 02:02
-
-
Save LincolnBurrows/2c786f46b9e4bb6c2420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "rapidjson/document.h" | |
using namespace rapidjson; | |
Document document; | |
const char* json = { | |
"hello": "world", | |
"t": true , | |
"f": false, | |
"n": null, | |
"i": 123, | |
"pi": 3.1416, | |
"a": [1, 2, 3, 4] | |
} | |
document.Parse(json); | |
const Value& a = document["a"]; | |
for(SizeType i = 0;i<a.Size();i++) | |
printf("a[%d] = %d\n",i,a[i].GetInt()); | |
for(Value::ConstValueIterator itr = a.Begin();itr!=a.End();++itr) | |
printf("%d",itr->GetInt()); | |
for(Value::ConstMemberIterator itr=document.MemberBegin();itr!=document.MemberEnd();++itr) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment