Money icon indicating copy to clipboard operation
Money copied to clipboard

Change "currencyCode" JSON coding key to "currency"

Open EthanLozano opened this issue 2 years ago • 0 comments

Please make the "currencyCode" JSON key configurable to "currency", or please change this key to "currency" for better compatibility between libraries.

The JSON serialization/deserialization of a Money object does not seem to be configurable to another key besides "currencyCode". Whereas, "currency" seems to be the preferred default JSON key for money libraries in other languages (i.e. jackson-datatype-money & dinero). Also, not every library can be configured to use "currencyCode" as the JSON key, and "currency" is a shorter key that offers minor savings in bandwidth and storage costs.

EthanLozano avatar Jul 09 '22 19:07 EthanLozano