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

Crack::JSON can't parse valid json string with UTF-8 character #52

Open
bblimke opened this issue Nov 8, 2014 · 0 comments
Open

Crack::JSON can't parse valid json string with UTF-8 character #52

bblimke opened this issue Nov 8, 2014 · 0 comments

Comments

@bblimke
Copy link

bblimke commented Nov 8, 2014

Parsing the following json "{"data":"{\"foo\":\"\u0026\""}""` raises "Crack::ParseError".

i.e.

require 'json'
require 'crack'

json = JSON.generate({"data"=>"{\"foo\":\"\\u0026\""})

JSON.parse(json)

Crack::JSON.parse(json)

> `rescue in parse': Invalid JSON string (Crack::ParseError)

This seems to be a problem with Psych not being able to handle well \u0026 character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant