This is how I use it. The rest request returns a ...
# kvision
m
This is how I use it. The rest request returns a list of currencies like:
Copy code
[
    {
        "currencyCode": "CHF",
        "currencyFxRate": 9.808,
        "currencyFxRateDate": "2019-10-01",
        "currencyChangedDate": "2019-10-01 00:00:00"
    },
    {
        "currencyCode": "DKK",
        "currencyFxRate": 1.434,
        "currencyFxRateDate": "2019-10-01",
        "currencyChangedDate": "2019-10-01 00:00:00"
    }
]
Therefore I created
Copy code
@Serializable
data class Currency(
        val currencyCode: String,
        val currencyFxRate: Double,
        val currencyFxRateDate: Date,
        val currencyChangedDate: DateTime
        )
But for
Date
and
DateTime
it get the error message:
serializer has not been found for type Date. To use context serializer as fallback, explicitly annotate type or property with @ContextualSerialization
.