ArduinoJson can decode Unicode escape sequences (\uXXXX) in JSON documents, but this feature is disabled by default.

You must define ARDUINOJSON_DECODE_UNICODE to 1 to enable it:

#include <ArduinoJson.h>

If this feature is enabled, deserializeJson() converts the Unicode escape sequences to UTF-8 characters. If it’s disabled, deserializeJson() returns NotSupported when the input contains a Unicode escape sequence.

Please note that the support for Unicode escape sequence is not fully compliant with the specification. ArduinoJson produces proper UTF-8 only for code points below 0x10000. Above this limit, it produces a degenerated variant of UTF-8 known as CESU-8. Simply put, ArduinoJson treats surrogate pairs (characters that require two escape sequences) as two characters instead of one.


StaticJsonDocument<300> doc;

deserializeJson(doc, "{'firstname':'Beno\\u00EEt'}");
Serial.println(doc["firstname"].as<char*>()); // Benoît

👨‍🏫 Try this example online