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

Returning a bare string meant to be application/json doesn't properly quote the string #4

Closed
keklabs opened this issue Mar 15, 2013 · 2 comments

Comments

@keklabs
Copy link

keklabs commented Mar 15, 2013

I have the same problem as described in
https://github.com/codahale/dropwizard/issues/231
there are some notes from me with possible solutions.
Please, provide some option to solve this issue in jackson.
Thank you very much

@cowtowncoder
Copy link
Member

Ah. Did not notice this behavior replying on mailing list.

I would suggest you first try configuring your provider instance. Changing default behavior is unlikely to happen, even if just for backwards compatibility -- this would break lots of deployments, where application code explicitly builds JSON String to return as-is. While it is not necessarily a particularly good way to do things IMO, it is something that is commonly done and may make sense occasionally.

I am open to suggestions for easier configuration of such thing, whether it is via on/off features or other config changing methods.

@cowtowncoder
Copy link
Member

Quick note: it should be possible to now (2.2.0) use method provider.removeUntouchable(String.class) to allow Jackson to write String as JSON String value.

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

2 participants