What would be the recommended way to serialize/deserialize money amounts? I'm getting a decimal amount of money from an API and
BigDecimal
doesn't have a default serializer. Is the best thing to do creating a serializer for
BigDecimal
?
e
ephemient
07/09/2022, 12:25 AM
serialize it as a string for portability - many JSON implementations don't support primitive numbers outside of Javascript's range, and that includes kotlinx.serialization