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

Several .ino or .cpp files?

Be careful if several compilation units compose your program, i.e., if your project contains several .ino or .cpp files.

You should define the same value of ARDUINOJSON_DECODE_UNICODE in each compilation unit; otherwise, the executable will be much bigger because it will contain two variants of the library.