google / google/gson

Add option to preserve unicode character conversion

Open
#2,382 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

# Problem solved by the feature
In the current implementation, when we deserialize a JSON string to an object the Unicode character conversion is converted to the Unicode character. For example `\u0161` is converted to `š`. As a result, when we serialize back to JSON we get the Unicode character instead of the Unicode character conversion. Even though both strings `\u0161` and `š` are valid and the same, it's better to have the option to preserve the original string(`\u0161`) when we serialize back.

# Feature description
Add an option that will preserve `\u0161` as it when we deserialize or serialize back to JSON

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.