added a pretty output to JString. Initial.

This commit is contained in:
barant committed 2024-12-17 16:56:05 -08:00
1 parent d1e5e41ab2
commit d74fa9689d
4 files changed
+40 -1

No files matched your search

+3
View File
@@ -27,6 +27,7 @@ int main(int argc, char **argv) {
test1["object1"] = "{\"attr1\":\"value1\",\"attr2\":\"value2\",\"attr3\":\"value3\"}";
test1["object1.attr2"] = "{\"xattr1\":\"xvalue1\",\"xattr2\":\"xvalue2\",\"xattr3\":\"xvalue3\"}";
test1["object1.attr3"] = "Im not an object";
// test1["age"] = 64; future
std::cout << test1 << std::endl;
@@ -58,6 +59,8 @@ int main(int argc, char **argv) {
test9 = test1["object1"];
std::cout << test9 << std::endl;
std::cout << test9["attr3"] << std::endl;
std::cout << test1.pretty() << std::endl;
return 0;
}