mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
- VS2012: build/tests
- JSON: style and exceptions catch by ref fix - NumberParser: case-insensitive hex parsing - Dynamic::Var: const std::string& cast operator specialization (coaxing std::string ctor) - LocalDateTime: strftime fix (buffer too small for full tz string, use %Z instead of %z - makes no difference on windows but is more portable) - small buildwin.cmd vsvars32.bat call fix
This commit is contained in:
@@ -40,10 +40,12 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace Poco
|
||||
{
|
||||
namespace JSON
|
||||
{
|
||||
|
||||
using Poco::Dynamic::Var;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace JSON {
|
||||
|
||||
|
||||
Object::Object()
|
||||
@@ -51,19 +53,21 @@ Object::Object()
|
||||
|
||||
}
|
||||
|
||||
|
||||
Object::Object(const Object& copy) : _values(copy._values)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Object::~Object()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
DynamicAny Object::get(const std::string& key) const
|
||||
Var Object::get(const std::string& key) const
|
||||
{
|
||||
DynamicAny value;
|
||||
Var value;
|
||||
|
||||
ValueMap::const_iterator it = _values.find(key);
|
||||
if ( it != _values.end() )
|
||||
@@ -78,7 +82,7 @@ Array::Ptr Object::getArray(const std::string& key) const
|
||||
{
|
||||
Array::Ptr result;
|
||||
|
||||
DynamicAny value = get(key);
|
||||
Var value = get(key);
|
||||
if ( value.type() == typeid(Array::Ptr) )
|
||||
{
|
||||
result = value.extract<Array::Ptr>();
|
||||
@@ -91,7 +95,7 @@ Object::Ptr Object::getObject(const std::string& key) const
|
||||
{
|
||||
Object::Ptr result;
|
||||
|
||||
DynamicAny value = get(key);
|
||||
Var value = get(key);
|
||||
if ( value.type() == typeid(Object::Ptr) )
|
||||
{
|
||||
result = value.extract<Object::Ptr>();
|
||||
|
||||
Reference in New Issue
Block a user