diff options
author | Patrick Simianer <p@simianer.de> | 2014-07-13 14:04:45 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-07-13 14:04:45 +0200 |
commit | 625269764ebbe8d0b566e6ef5fc26a6bccd4181d (patch) | |
tree | 70c54cb1dae9afddaefd7f0824427e95dd688081 /test_MicroJSON.cc |
init
Diffstat (limited to 'test_MicroJSON.cc')
-rw-r--r-- | test_MicroJSON.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test_MicroJSON.cc b/test_MicroJSON.cc new file mode 100644 index 0000000..d8d4969 --- /dev/null +++ b/test_MicroJSON.cc @@ -0,0 +1,28 @@ +#include <iostream> +#include <fstream> +#include <string> + +/* + * http://grigory.info/MicroJSON.About.html + * + */ +#include "MicroJSON-0.3.2/Node.h" + +using namespace std; + + +int +main(int argc, char** argv) +{ + ifstream ifs(argv[1]); + string json_str((istreambuf_iterator<char>(ifs)), + (istreambuf_iterator<char>())); + + MicroJSON::Node Root; + Root.Parse(json_str); + MicroJSON::Node* edges = Root.GetSubNode("edges"); + cerr << edges->GetChildren().back()->GetSubNode("rule") << endl; + + return 0; +} + |