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

Jackson JSON parser should attempt to parse content where mime type ends in `+json` #793

Closed
ldaley opened this issue Sep 27, 2015 · 2 comments
Closed
Milestone

Comments

@ldaley
Copy link
Member

@ldaley ldaley commented Sep 27, 2015

@ldaley

This comment has been minimized.

Copy link
Member Author

@ldaley ldaley commented Oct 5, 2015

@ratpack/committers I'm trying to decide whether to update http://ratpack.io/manual/current/api/ratpack/http/MediaType.html#isJson-- to return true for content types that end in +json. An alternative would be to add a new method (e.g. isJsonLike()) that returns true for application/json and +json.

WDYT?

Then we just have to change https://github.com/ratpack/ratpack/blob/master/ratpack-core/src/main/java/ratpack/jackson/internal/JsonParser.java#L40-40 (or not).

@rhart

This comment has been minimized.

Copy link
Member

@rhart rhart commented Oct 5, 2015

I think I would stick with changing isJson. From what I understand, +json is telling you that the format of the custom mime type is json. So unless we need to distinguish between the standard mime type and custom json ones I'm not sure I'd bother adding isJsonLike()

I guess we also need to do this for isXml too

@ldaley ldaley closed this in f4d6565 Oct 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.