Created
October 18, 2014 17:51
-
-
Save v6ak/a3ee8d5759e964f3fec1 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 <iostream> | |
#include "json.h" | |
using namespace std; | |
int main() { | |
Json::Number num(3.14159265358972); | |
Json::String s("5.\" ' \1 0"); | |
Json::Boolean t(true); | |
Json::Boolean f(false); | |
Json::Array a = {{&s, &t, &f, &num}}; | |
Json::Object o = {{{"num", &num}, {"t", &t}, {"a", &a}}}; | |
cout << num << endl << s << endl << endl; | |
cout << Json::null << " " << t << " " << f << endl; | |
cout << "a: " << a << endl; | |
cout << "o: " << o << endl; | |
return 0; | |
} |
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
3.14159 | |
"5.\" ' \u0x7fff064b1828 0" | |
null true false | |
a: [ | |
"5.\" ' \u0x7fff064b17a8 0", | |
true, | |
false, | |
3.14159 | |
] | |
o: { | |
"a":[ | |
"5.\" ' \u0x7fff064b1708 0", | |
true, | |
false, | |
3.14159 | |
], | |
"num":3.14159, | |
"t":true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment