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

Deprecate HttpMapperProperties in favour of configuring the underlying Gson or ObjectMapper instance #1945

Closed
wilkinsona opened this issue Nov 18, 2014 · 0 comments
Assignees
Milestone

Comments

@wilkinsona
Copy link
Member

From the comments on 1919:

@sdeleuze:

I tend to agree since there is a lot of different ways to configure Jackson, and this one is IMO the less relevant. It only allows to configure 2 properties that could be configured thanks to the spring.jackson.* ones or thanks to a Jackson2ObjectMapperBuilder bean.

Last argument in favor of removing it, current property names (jsonPrettyPrint, jsonSortKeys) may be confusing when using Jackson for XML serialisation.

@wilkinsona:

I'm not a fan of the http.mappers.* configuration either. It tries to provide an abstraction that doesn't work as not all mapping technologies are the same. For example, you can't enable pretty printing with Gson after the Gson instance has been created. Also, as you've pointed out the property names assume JSON which may not be the case.

@sdeleuze:

If you think it is too late (and I hope it is not), my proposal would be to :

  • Merge Use HttpMapper properties only if defined #1923 in order to avoid the issue I described with pretty print
  • Deprecate HttpMapperProperties
  • Remove documentation about http.mappers.* properties
  • Log a message to warn people they are using a deprecated functionality and that they should use > spring.jackson.* instead

@philwebb:

We could change this for RC2 if we think leaving it is going to ultimately cause more pain. I'm not keen for the property to simply disappear, but the deprecated warning seems fair enough.

@wilkinsona wilkinsona added this to the 1.2.0.RC2 milestone Nov 18, 2014
@wilkinsona wilkinsona self-assigned this Nov 18, 2014
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