1 #include <Poco/JSON/Object.h>
2 #include <Poco/JSON/Array.h>
3 #include <Poco/JSON/JSON.h>
4 #include <Poco/JSON/Stringifier.h>
5 #include <Poco/JSON/Parser.h>
6 #include <Poco/JSON/JSONException.h>
7 #include <Poco/Dynamic/Var.h>
33 Poco::JSON::Object::Ptr obj =
new Poco::JSON::Object();
37 std::stringstream ostr;
38 Poco::JSON::Stringifier::stringify(obj, ostr);
43 catch(std::exception& e)
59 Poco::JSON::Parser parser;
60 Poco::Dynamic::Var res = parser.parse(json);
61 Poco::JSON::Object::Ptr obj = res.extract<Poco::JSON::Object::Ptr>();
68 catch(Poco::JSON::JSONException& e)
74 catch(Poco::Exception& e)
91 is.seekg(0, std::ios::end);
92 json.resize(is.tellg());
93 is.seekg(0, std::ios::beg);
94 is.read(const_cast<char*>(json.c_str()), json.size());