Overview
Features
Download
Documentation
Community
Add-Ons & Services

JSON implementation, bug or not....

A general discussion forum.

JSON implementation, bug or not....

Postby ScorpZ » 11 Dec 2012, 16:02

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: 6
Joined: 11 Dec 2012, 15:47
Location: Ukraine

Re: JSON implementation, bug or not....

Postby alex » 11 Dec 2012, 23:49

It's a bug. Will be fixed in 1.5.1: https://github.com/pocoproject/poco/issues/31

thanks
alex
 
Posts: 1105
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: JSON implementation, bug or not....

Postby alex » 12 Dec 2012, 04:29

alex
 
Posts: 1105
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron