A Jackson module for JSON serialization and deserialization of JavaMoney (javax.money) data types.
Jackson Datatype Money is a Jackson module that enables JSON serialization and deserialization for JavaMoney (javax.money) data types. It solves the problem of manually converting monetary amounts in Java applications that use the JavaMoney API, providing a standardized JSON representation and reducing boilerplate code.
Java developers building REST APIs or applications that need to handle monetary values and want to use the JavaMoney API with Jackson for JSON processing.
It offers a seamless, zero-configuration integration between JavaMoney and Jackson, with features like customizable field names, locale-based formatting, and support for multiple MonetaryAmount implementations, saving development time and ensuring consistency.
Extension module to properly support datatypes of javax.money
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically serializes MonetaryAmount to a clean JSON structure with 'amount' and 'currency' fields, eliminating manual conversion boilerplate as described in the README.
Adds a 'formatted' field based on locale, enabling REST APIs to display currency in user-localized formats without custom code, leveraging the Accept-Language header support.
Supports multiple MonetaryAmount implementations like Money, FastMoney, and RoundedMoney through configurable factories, allowing seamless integration with different JavaMoney backends.
Allows overriding default JSON field names such as 'amount' or 'currency' to match specific API designs, providing flexibility in JSON representation.
The project is explicitly marked as deprecated with no future updates, bug fixes, or security patches, making it risky for production use and forcing migration.
Users must switch to FasterXML's maintained modules, involving dependency changes and potential code adjustments, as admitted in the README's deprecation notice.
Being deprecated, it may not integrate well with newer Jackson versions or Java ecosystems, risking breaking changes or unsupported features over time.