diff options
author | Patrick Simianer <p@simianer.de> | 2014-08-16 21:25:52 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-08-16 21:25:52 +0100 |
commit | 9a0859212de4d1304f9392fe910921227421c8c3 (patch) | |
tree | 1b1276312c83415d7d7d3838ce0347441b71951a /lib/cdec_json_parser/json_parse.cc | |
parent | 3ba77e3474e39d7970784812f6851a726572f7c7 (diff) |
cleanup
Diffstat (limited to 'lib/cdec_json_parser/json_parse.cc')
-rw-r--r-- | lib/cdec_json_parser/json_parse.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/cdec_json_parser/json_parse.cc b/lib/cdec_json_parser/json_parse.cc new file mode 100644 index 0000000..4580fc8 --- /dev/null +++ b/lib/cdec_json_parser/json_parse.cc @@ -0,0 +1,31 @@ +#include "json_parse.h" + +#include <string> +#include <iostream> + +using namespace std; + + +bool JSONParser::HandleJSONEvent(int type, const JSON_value* value) { + switch(type) { + case JSON_T_OBJECT_BEGIN: + case JSON_T_OBJECT_END: + case JSON_T_ARRAY_BEGIN: + case JSON_T_ARRAY_END: + case JSON_T_NULL: + case JSON_T_TRUE: + case JSON_T_FALSE: + case JSON_T_KEY: + case JSON_T_INTEGER: + case JSON_T_FLOAT: + break; + case JSON_T_STRING: + string s = value->vu.str.value; + string t = s.substr(1, 4); + if (t == "Goal") + cerr << t << endl; + break; + } + return true; +} + |