← Back to Kairo Docs|API Reference (Dokka)

MoneyFormat

abstract class MoneyFormat

Controls how Money is serialized to and deserialized from JSON. Extend this class to define a custom wire format for monetary values.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Serializes Money as {"amount": 123.45, "currency": "USD"}. The amount is written as an exact BigDecimal to avoid floating-point precision loss.

Properties

Link copied to clipboard
abstract val deserializer: JsonDeserializer<Money>
Link copied to clipboard
abstract val serializer: JsonSerializer<Money>