mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-19 08:46:41 +01:00
Util alignment with JSON changes
This commit is contained in:
parent
25311c7eed
commit
ad5361ede1
@ -45,7 +45,6 @@
|
|||||||
#include "Poco/StringTokenizer.h"
|
#include "Poco/StringTokenizer.h"
|
||||||
#include "Poco/JSON/Parser.h"
|
#include "Poco/JSON/Parser.h"
|
||||||
#include "Poco/JSON/Query.h"
|
#include "Poco/JSON/Query.h"
|
||||||
#include "Poco/JSON/DefaultHandler.h"
|
|
||||||
#include "Poco/RegularExpression.h"
|
#include "Poco/RegularExpression.h"
|
||||||
#include "Poco/NumberParser.h"
|
#include "Poco/NumberParser.h"
|
||||||
|
|
||||||
@ -91,10 +90,8 @@ void JSONConfiguration::load(const std::string& path)
|
|||||||
void JSONConfiguration::load(std::istream& istr)
|
void JSONConfiguration::load(std::istream& istr)
|
||||||
{
|
{
|
||||||
JSON::Parser parser;
|
JSON::Parser parser;
|
||||||
JSON::DefaultHandler handler;
|
|
||||||
parser.setHandler(&handler);
|
|
||||||
parser.parse(istr);
|
parser.parse(istr);
|
||||||
DynamicAny result = handler.result();
|
DynamicAny result = parser.result();
|
||||||
if ( result.type() == typeid(JSON::Object::Ptr) )
|
if ( result.type() == typeid(JSON::Object::Ptr) )
|
||||||
{
|
{
|
||||||
_object = result.extract<JSON::Object::Ptr>();
|
_object = result.extract<JSON::Object::Ptr>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user