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 know as CESU-8. Simply put, ArduinoJson treats surrogate pairs (characters that require two escape sequences) as two independent characters.


StaticJsonDocument<300> doc;

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

👨‍🏫 Try this example online