-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[deserialize] Unicode escape "\u0000" is silently ignored #1646
Comments
Hi @bupjae, You're right; there was something wrong: instead of including the null in the string, it dropped it entirely. Now, if you extract a I agree to add a word about this in the documentation, but the question is: where? Best regards, |
It seems that unless JsonDocument holds length for each involved strings, NUL character inside document can cause various problems across all places. For example, after applying patch, output of I agree that the priority is low as this is very artificial example and may not have solid use case. Until then, we should be documented this issue; for example, "Strings containing NUL character (ASCII code 0, or Suggested places to document this issue:
|
I documented the issue in the four suggested locations. |
The fix was release in ArduinoJson 6.19.0. |
ArduinoJson version: v6.18.3
Target platform: x86-64
Toolchain: gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Code snippet:
Excepted result (NUL character is replaced to '_' for visibility):
Actual result:
I understand that NUL character inside string is very hard to handle for C/C++ code. However, I think this behavior should be documented at least.
The text was updated successfully, but these errors were encountered: