JFile seems to work well now.
This commit is contained in:
1 parent
ffa3361fd2
commit
ab748802ee
5 files changed
+3
-24
No files matched your search
@@ -6,14 +6,8 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
coreutils::MString test0("{ \"Number\": \"0\", \"id\": \"XXXXX\" }");
|
||||
coreutils::JFile test1("jfile_test.data");
|
||||
coreutils::JString test9;
|
||||
|
||||
test1 = test0;
|
||||
std::cout << test1 << std::endl;
|
||||
|
||||
std::cout << test1["id"] << std::endl;
|
||||
|
||||
test1["name"] = "Cohen";
|
||||
|
||||
@@ -31,9 +25,6 @@ int main(int argc, char **argv) {
|
||||
// test1["age"] = 64; future
|
||||
|
||||
std::cout << test1 << std::endl;
|
||||
|
||||
coreutils::ZString test2 = test1["name"];
|
||||
std::cout << test2 << std::endl;
|
||||
|
||||
std::cout << test1["name"] << std::endl;
|
||||
std::cout << test1["health"] << std::endl;
|
||||
@@ -50,17 +41,6 @@ int main(int argc, char **argv) {
|
||||
std::cout << test1["array[1]"] << std::endl;
|
||||
std::cout << test1["array[2]"] << std::endl;
|
||||
|
||||
std::string string1 = test1["tester"];
|
||||
std::cout << "from string: " << string1 << std::endl;
|
||||
|
||||
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;
|
||||
|
||||
std::cout << test1.pretty() << std::endl;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user