mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 09:24:55 +02:00
#3470: bug in JSON ParseHandler.cpp (RFC 7159 should be valid)
This commit is contained in:
parent
02abb70601
commit
3b1484ca50
@ -61,7 +61,6 @@ void ParseHandler::startObject()
|
|||||||
}
|
}
|
||||||
else if (parent.type() == typeid(Object::Ptr))
|
else if (parent.type() == typeid(Object::Ptr))
|
||||||
{
|
{
|
||||||
poco_assert_dbg(!_key.empty());
|
|
||||||
Object::Ptr obj = parent.extract<Object::Ptr>();
|
Object::Ptr obj = parent.extract<Object::Ptr>();
|
||||||
obj->set(_key, newObj);
|
obj->set(_key, newObj);
|
||||||
_key.clear();
|
_key.clear();
|
||||||
@ -97,7 +96,6 @@ void ParseHandler::startArray()
|
|||||||
}
|
}
|
||||||
else if (parent.type() == typeid(Object::Ptr))
|
else if (parent.type() == typeid(Object::Ptr))
|
||||||
{
|
{
|
||||||
poco_assert_dbg(!_key.empty());
|
|
||||||
Object::Ptr obj = parent.extract<Object::Ptr>();
|
Object::Ptr obj = parent.extract<Object::Ptr>();
|
||||||
obj->set(_key, newArr);
|
obj->set(_key, newArr);
|
||||||
_key.clear();
|
_key.clear();
|
||||||
|
11
JSON/testsuite/data/valid/empty-key-array/input
Normal file
11
JSON/testsuite/data/valid/empty-key-array/input
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"": [
|
||||||
|
{
|
||||||
|
"": "empty-key"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"": "empty-key"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
6
JSON/testsuite/data/valid/empty-key-object/input
Normal file
6
JSON/testsuite/data/valid/empty-key-object/input
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"": {
|
||||||
|
"": "empty-key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user