Skip to content

JSON implementation bug #31

@aleks-f

Description

@aleks-f

posted in forum:

http://pocoproject.org/forum/viewtopic.php?f=10&t=5670

JSON implementation, bug or not....
by ScorpZ » Tue Dec 11, 2012 9:02 am

Hello to all.
-> I downloaded 1.5.0 POCO with JSON support.
-> Compiled and run my application (with POCO::JSON)
-> All object types (Include/Poco/Json/Object.h) return as Arrays and Objects (Poco::JSON::Object::isArray() and ... isObject() return true)
-> I looked Object.h header file and i saw there -
//-----------------------------------------------------------------------------------------------------------
CODE: SELECT ALL
inline bool Object::isArray(const std::string& key) const
{
ValueMap::const_iterator it = _values.find(key);
return it != _values.end() || it->second.type() == typeid(Array::Ptr);
}

//-----------------------------------------------------------------------------------------------------------
-> It method returns true for all found properties
-> Maybe must by

CODE: SELECT ALL
inline bool Object::isArray(const std::string& key) const
{
ValueMap::const_iterator it = _values.find(key);
return it != _values.end() && it->second.type() == typeid(Array::Ptr);
}

.Thanks
ScorpZ

Posts: 1
Joined: Tue Dec 11, 2012 8:47 am

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions