GH31: JSON implementation bug

fixed GH #31: JSON implementation bug
This commit is contained in:
aleks-f
2012-12-11 20:27:32 -06:00
parent e21d1f5fcc
commit 1b14088283
5 changed files with 41 additions and 6 deletions

View File

@@ -161,7 +161,7 @@ inline bool Object::has(const std::string& key) const
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);
return it != _values.end() && it->second.type() == typeid(Array::Ptr);
}
@@ -175,7 +175,7 @@ inline bool Object::isNull(const std::string& key) const
inline bool Object::isObject(const std::string& key) const
{
ValueMap::const_iterator it = _values.find(key);
return it != _values.end() || it->second.type() == typeid(Object::Ptr);
return it != _values.end() && it->second.type() == typeid(Object::Ptr);
}