JString fix to compress initial assignment JSON.

This commit is contained in:
barant committed 2024-12-17 09:56:55 -08:00
1 parent 83e9b8ca99
commit 95254310f0
6 files changed
+45 -9

No files matched your search

+6 -1
View File
@@ -5,8 +5,9 @@
int main(int argc, char **argv) {
coreutils::MString test0("{\"Number\":\"0\",\"id\":\"XXXXX\"}");
coreutils::MString test0("{ \"Number\": \"0\", \"id\": \"XXXXX\" }");
coreutils::JString test1;
coreutils::JString test9;
test1 = test0;
std::cout << test1 << std::endl;
@@ -53,6 +54,10 @@ int main(int argc, char **argv) {
coreutils::MString testout;
testout << "this is a test: " << test1["comment"];
std::cout << testout << std::endl;
test9 = test1["object1"];
std::cout << test9 << std::endl;
std::cout << test9["attr3"] << std::endl;
return 0;
}