Add option to preserve Unicode - #168
joyfullservice wants to merge 4 commits into
Conversation
In many cases we may want to preserve the Unicode text in our JSON content. This adds a non-default option to preserve the Unicode content.
|
Not working for me. For example: l'\u00C9glise instead of l'Église. |
Did you set the option to allow Unicode characters? |
|
Works perfectly well on my end, Indeed, before using the ConvertToJson function, remember to set : |
|
Yes, it has worked great in my projects for the last two years. I am hopeful that @timhall will consider merging this PR for the benefit of those that are working with UTF-8 content. (Which is standard practice in most software development and integrations, from my experience.) |
|
It worked like a charm for me as well if we call it with the new option: |
|
maybe this helps someone else, although the repository is already old and does not get an update anymore the change as suggested by @joyfullservice worked for me. |
When converting JSON back to a string, Line Feed characters should be converted back to line feed characters, not Carriage Return & Line Feed.
Based on suggestion from @fricyo. This should better handle the euro symbol which is available in commonly used code pages.
- Dispatch Dictionary/Collection with TypeOf and skip per-character escaping when a UTF-16 scan finds nothing to escape - Keep ConvertToJsonReference on the original encoder for A/B checks; specs assert compact and pretty output match across Unicode and solidus options
In many cases we may want to preserve the Unicode text in our JSON content. This adds a non-default option to preserve the Unicode content.