spring-projects / spring-data-mongodb

Provides support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-mongodb/
Apache License 2.0
1.62k stars 1.09k forks source link

JSR 354 Support for Money [DATAMONGO-1446] #2357

Closed spring-projects-issues closed 3 years ago

spring-projects-issues commented 8 years ago

Bjorn Harvold opened DATAMONGO-1446 and commented

With the support of java.util.Currency it would be nice to have full JSR 354 support. Jackson has a module for serializing JSR 354 here: https://github.com/zalando/jackson-datatype-money


Affects: 1.9.1 (Hopper SR1)

1 votes, 2 watchers

spring-projects-issues commented 8 years ago

Oliver Drotbohm commented

It's not an official Jackson module though ;). As you can see from the docs over there' there's plenty of customization options that go into this and as we'd have to stick to a particular to auto-register them it's gonna be a suboptimal choice for everyone. It get's quite obvious that the registration is a manual process with Jackson.

If instead we allowed to customize the way we serialize those values, we're basically back to you writing the Converter yourself as it's basically two lambdas. So I currently don't see much value in providing and auto-registering converters for MonetaryAmount

spring-projects-issues commented 3 years ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 3 years ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.