|
|
|
@ -91,6 +91,14 @@ int main(int argc, char **argv) { |
|
|
|
|
assert(uni[0].string_value().size() == (sizeof utf8) - 1); |
|
|
|
|
assert(memcmp(uni[0].string_value().data(), utf8, sizeof utf8) == 0); |
|
|
|
|
|
|
|
|
|
// Demonstrates the behavior change in Xcode 7 / Clang 3.7 described
|
|
|
|
|
// here: https://llvm.org/bugs/show_bug.cgi?id=23812
|
|
|
|
|
Json nested_array = Json::array { Json::array { 1, 2, 3 } }; |
|
|
|
|
assert(nested_array.is_array()); |
|
|
|
|
assert(nested_array.array_items().size() == 1); |
|
|
|
|
assert(nested_array.array_items()[0].is_array()); |
|
|
|
|
assert(nested_array.array_items()[0].array_items().size() == 3); |
|
|
|
|
|
|
|
|
|
Json my_json = Json::object { |
|
|
|
|
{ "key1", "value1" }, |
|
|
|
|
{ "key2", false }, |
|
|
|
|