forked from bblanchon/ArduinoJson
Remove the zero-copy mode
After removing the string size from `VariantContent`, `deserializeJson()` and `deserializeMsgPack()` could not support NUL in strings in the zero-copy mode anymore. Instead of adding a complicated warning in the documentation, I thought it was better to remove the zero-copy mode entirely. The zero-copy mode has always been a source of bugs because many users used it without realizing it. Also, the memory savings are smaller now that we deduplicate strings, so this feature should not be missed much.
This commit is contained in:
@ -154,12 +154,6 @@ TEST_CASE("String allocation fails") {
|
||||
REQUIRE(spyingAllocator.log() ==
|
||||
AllocatorLog() << AllocatorLog::AllocateFail(sizeofString(31)));
|
||||
}
|
||||
|
||||
SECTION("Input is const char*") {
|
||||
char hello[] = "\"hello\"";
|
||||
REQUIRE(deserializeJson(doc, hello) == DeserializationError::Ok);
|
||||
REQUIRE(spyingAllocator.log() == AllocatorLog());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Deduplicate values") {
|
||||
|
Reference in New Issue
Block a user