Unexplained behavior of char array after using `deserializeJson`
When you pass a char* input to deserializeJson(), it alters the input to avoid making useless copies.
This is the &quot;zero-copy&quot; mode of ArduinoJson.
In this mode, the JSON parser modifies the input in-place. The following modifications are performed:

'\0' are inserted at the end of each string
Escaped special characters (like \n) are unescaped

Example:
char[] json = &quot;{\&quot;hello\&quot;:\&quot;world\&quot;}&quot;;
deserializeJson(doc, json);

After executing the line above, the input variable probably contains something like: &quot;hello\0world\0&quot;.
You can find more details in the documentation