mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-21 06:22:23 +02:00
Merged MsgPackError and JsonError into DeserializationError.
Return NotSupported if the JSON input contains "\u".
This commit is contained in:
@ -14,18 +14,18 @@ TEST_CASE("unsigned char[]") {
|
||||
unsigned char input[] = "{\"a\":42}";
|
||||
|
||||
StaticJsonDocument<JSON_OBJECT_SIZE(1)> doc;
|
||||
JsonError err = deserializeJson(doc, input);
|
||||
DeserializationError err = deserializeJson(doc, input);
|
||||
|
||||
REQUIRE(err == JsonError::Ok);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
|
||||
SECTION("deserializeMsgPack()") {
|
||||
unsigned char input[] = "\xDE\x00\x01\xA5Hello\xA5world";
|
||||
|
||||
StaticJsonDocument<JSON_OBJECT_SIZE(2)> doc;
|
||||
MsgPackError err = deserializeMsgPack(doc, input);
|
||||
DeserializationError err = deserializeMsgPack(doc, input);
|
||||
|
||||
REQUIRE(err == MsgPackError::Ok);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
|
||||
SECTION("JsonVariant") {
|
||||
|
Reference in New Issue
Block a user