Return JsonArray and JsonObject by value (closes #309)

This commit is contained in:
Benoit Blanchon
2018-07-02 09:35:21 +02:00
parent 4fe2b1100e
commit b105e6f7c4
93 changed files with 983 additions and 1091 deletions

View File

@ -13,7 +13,7 @@ TEST_CASE("deserializeJson(std::istream&)") {
std::istringstream json(" [ 42 /* comment */ ] ");
DeserializationError err = deserializeJson(doc, json);
JsonArray& arr = doc.as<JsonArray>();
JsonArray arr = doc.as<JsonArray>();
REQUIRE(err == DeserializationError::Ok);
REQUIRE(1 == arr.size());
@ -24,7 +24,7 @@ TEST_CASE("deserializeJson(std::istream&)") {
std::istringstream json(" { hello : world // comment\n }");
DeserializationError err = deserializeJson(doc, json);
JsonObject& obj = doc.as<JsonObject>();
JsonObject obj = doc.as<JsonObject>();
REQUIRE(err == DeserializationError::Ok);
REQUIRE(1 == obj.size());