Worked on ZString, MString and JString
This commit is contained in:
1 parent
b873bbf164
commit
8a9c1c3bd7
14 files changed
+146
-42
No files matched your search
@@ -17,16 +17,19 @@ int main(int argc, char **argv) {
|
||||
// std::cout << test1 << std::endl;
|
||||
|
||||
coreutils::JString test2("{\"key1\":[{\"id\":\"1\",\"name\":\"Brad\"},{\"id\":\"2\",\"name\":\"Jenn\"},{\"id\":\"3\",\"name\":\"Skye\"}],\"key2\":\"data5\",\"key3\":\"data3\",\"key4\":\"data4\"}");
|
||||
|
||||
std::cout << test2 << std::endl;
|
||||
std::cout << "--------" << std::endl;
|
||||
// std::cout << test2["key2"] << std::endl;
|
||||
// std::cout << test2["key1"] << std::endl;
|
||||
// std::cout << "value: " << test2["key1.name[id=2]"] << std::endl;
|
||||
// std::cout << "value: " << test2["key1.name[id=3]"] << std::endl;
|
||||
|
||||
test2["key2"] = "newvalue1";
|
||||
std::cout << test2["key2"] << std::endl;
|
||||
std::cout << "--------" << std::endl;
|
||||
// test2 = "newvalue";
|
||||
std::cout << test2 << std::endl;
|
||||
std::cout << test2 << std::endl;
|
||||
std::cout << "--------" << std::endl;
|
||||
std::cout << "key2: " << test2["key2"] << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user