Fixed deserializeJson() that stopped reading after {} (fixes #1335)

This commit is contained in:
Benoit Blanchon
2020-08-04 09:52:42 +02:00
parent 96b6571352
commit 35a39b8d8f
3 changed files with 13 additions and 4 deletions

View File

@ -290,4 +290,10 @@ TEST_CASE("deserialize JSON object") {
REQUIRE(obj.size() == 0);
REQUIRE(doc.memoryUsage() == JSON_OBJECT_SIZE(0));
}
SECTION("Issue #1335") {
std::string json("{\"a\":{},\"b\":{}}");
deserializeJson(doc, json);
CHECK(doc.as<std::string>() == json);
}
}