You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for maintaining cJSON, it has been very helpful in many of our projects!
However, I’ve encountered a limitation regarding how strings are handled within the library. As the documentation mentions, cJSON currently doesn't support strings that contain null characters (\0) because it relies on null-terminated strings.
This limitation makes it difficult to work with data that contains embedded null characters, especially when dealing with binary data or certain encodings. I understand that this might be a fundamental design choice due to how strings are managed in C, but I was wondering:
Are there any plans to support strings with null characters (\0) in future versions of cJSON?
If not, would there be any recommended approaches for handling such data within cJSON?
Having the ability to handle these strings, possibly through a function that allows specifying the string length explicitly (similar to strncpy), would greatly expand the library’s utility in various use cases where binary data is involved.
Thanks in advance for considering this request, and I look forward to your response!
Best regards
The text was updated successfully, but these errors were encountered:
Thank you for maintaining cJSON, it has been very helpful in many of our projects!
However, I’ve encountered a limitation regarding how strings are handled within the library. As the documentation mentions, cJSON currently doesn't support strings that contain null characters (\0) because it relies on null-terminated strings.
This limitation makes it difficult to work with data that contains embedded null characters, especially when dealing with binary data or certain encodings. I understand that this might be a fundamental design choice due to how strings are managed in C, but I was wondering:
Are there any plans to support strings with null characters (\0) in future versions of cJSON?
If not, would there be any recommended approaches for handling such data within cJSON?
Having the ability to handle these strings, possibly through a function that allows specifying the string length explicitly (similar to strncpy), would greatly expand the library’s utility in various use cases where binary data is involved.
Thanks in advance for considering this request, and I look forward to your response!
Best regards
The text was updated successfully, but these errors were encountered: