From 9a0859212de4d1304f9392fe910921227421c8c3 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sat, 16 Aug 2014 21:25:52 +0100 Subject: cleanup --- test_libjson.cc | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 test_libjson.cc (limited to 'test_libjson.cc') diff --git a/test_libjson.cc b/test_libjson.cc deleted file mode 100644 index 6b3e2a9..0000000 --- a/test_libjson.cc +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include - -/* - * http://sourceforge.net/projects/libjson/ - * - */ -#include "libjson/libjson.h" - -using namespace std; - - -void -walk(const JSONNode & n) -{ - JSONNode::const_iterator it = n.begin(); - while (it != n.end()){ - if (it->type() == JSON_ARRAY || it->type() == JSON_NODE){ - walk(*it); - } - string s = it->as_string(); - if (s.size() >= 5) { - string t = s.substr(1, 4); - if (t == "Goal") - cerr << t << endl; - } - ++it; - } -} - -int -main(int argc, char** argv) -{ - ifstream ifs(argv[1]); - string json_str((istreambuf_iterator(ifs)), - (istreambuf_iterator())); - - JSONNode n = libjson::parse(json_str); - walk(n); - - return 0; -} - -- cgit v1.2.3