Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace std;
- void MinifiedLoad() {
- std::string s = "[{\"array\":[1,2,3],\"bool\":true,\"double\":42.1,\"int\":42,\"map\":{\"key\":\"value\",\"bool_key\":false},\"null\":null,\"string\":\"hello\"}]";
- Array arr;
- arr.emplace_back(Dict{
- {"int"s, 42},
- {"double"s, 42.1},
- {"null"s, nullptr},
- {"string"s, "hello"s},
- {"array"s, Array{1, 2, 3}},
- {"bool"s, true},
- {"map"s, Dict{{"key"s, "value"s}, {"bool_key"s, false}}},
- });
- std::stringstream strm;
- strm << s;
- const auto doc = Load(strm);
- // assert(doc.GetRoot() == arr);
- Print(doc, cout);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement