mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 20:12:16 +02:00
deserializeJson() leaves \uXXXX instead of returning NotSupported
This commit is contained in:
@ -5,6 +5,7 @@ HEAD
|
||||
----
|
||||
|
||||
* Removed support for `char` values, see below (issue #1498)
|
||||
* `deserializeJson()` leaves `\uXXXX` unchanged instead of returning `NotSupported`
|
||||
|
||||
> ### BREAKING CHANGES
|
||||
>
|
||||
|
@ -7,5 +7,6 @@ TEST_CASE("ARDUINOJSON_DECODE_UNICODE == 0") {
|
||||
DynamicJsonDocument doc(2048);
|
||||
DeserializationError err = deserializeJson(doc, "\"\\uD834\\uDD1E\"");
|
||||
|
||||
REQUIRE(err == DeserializationError::NotSupported);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
REQUIRE(doc.as<std::string>() == "\\uD834\\uDD1E");
|
||||
}
|
||||
|
@ -384,11 +384,10 @@ class JsonDeserializer {
|
||||
return false;
|
||||
if (codepoint.append(codeunit))
|
||||
Utf8::encodeCodepoint(codepoint.value(), _stringStorage);
|
||||
continue;
|
||||
#else
|
||||
_error = DeserializationError::NotSupported;
|
||||
return false;
|
||||
_stringStorage.append('\\');
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
// replace char
|
||||
|
Reference in New Issue
Block a user