Skip to content
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

JSON unicode strings should be parsed into... well, unicode. #58

Closed
mniip opened this issue Feb 14, 2019 · 0 comments
Closed

JSON unicode strings should be parsed into... well, unicode. #58

mniip opened this issue Feb 14, 2019 · 0 comments
Labels
bug Something isn't working kind of a big deal This is important and should be given special attention

Comments

@mniip
Copy link

mniip commented Feb 14, 2019

Currently the parser would parse "\u2705" into T.pack "\x05". And to get T.pack "\x2705" you have to put "\u00e2\u009c\u0085" in the JSON.

@mankyKitty mankyKitty added bug Something isn't working kind of a big deal This is important and should be given special attention labels Feb 14, 2019
mankyKitty added a commit that referenced this issue Feb 14, 2019
Fixes #58, #57

Tried to add some general `lens-aeson`-esque optics. Most of these cannot be
made into law abiding optics due to the loss of information once the data
structure is translated to a different Haskell type.

Deleted some instances that would give rise to things that didn't obey the laws
and introduced some bugs because of this.

Deleted and renamed some functions.

Fixed some documentation errors.

Fixed a sneaky bug in the HeXDigit4 conversion function. There is more work to
be done here as some values are not handled correctly.

Added some prism law tests.

Added some regression tests to confirm handling on some unicode values. Fixed
some tests that should not have been passing.

Added some files to use for testing to avoid possible issues from using literal
`Text` or `ByteString` inputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kind of a big deal This is important and should be given special attention
Projects
None yet
Development

No branches or pull requests

2 participants