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

RFC4627 is obsoleted #132

Open
xuwei-k opened this issue Dec 20, 2017 · 1 comment
Open

RFC4627 is obsoleted #132

xuwei-k opened this issue Dec 20, 2017 · 1 comment

Comments

@xuwei-k
Copy link
Contributor

xuwei-k commented Dec 20, 2017

* UTF-16 or UTF-32, as per the heuristics in RFC-4627.

This document replaces [RFC7159]. [RFC7159] obsoleted [RFC4627],
which originally described JSON and registered the media type
"application/json".

https://tools.ietf.org/html/rfc8259

@gmethvin
Copy link
Member

Using the heuristics in RFC4627 allows us to parse all JSON that is valid under RFC8259, since it detects and parses UTF-8 JSON, so I don't think this is a bug.

Note that the actual decoding is done automatically by Jackson right now, so changing the code to support only UTF-8 would probably be more complicated. We could improve the comment to clarify that this method of parsing supports encodings that would not be valid under RFC8259.

If we were to implement a new parser in a future version of play-json, RFC8259 provides a solid reason to simplify things by only supporting UTF-8, but I don't see any value in breaking existing behavior.

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

3 participants