Amount<T> is deserialised from JSON,YAML as Amount<Currency>, for all values of T

Description

Corda defines the Amount class as:

1 2 3 4 5 data class Amount<T : Any>( val quantity: Long, val displayTokenSize: BigDecimal, val token: T ) : Comparable<Amount<T>>

and obviously intends for users to handle amounts of their own type, c.f. FungibleAsset. However, we have configured our JSON library always to deserialise it as if T is java.util.Currency.

We need to teach Corda how to deserialise amounts which are not Currency.

Status

Assignee

Chris Rankin

Reporter

Chris Rankin

Labels

Priority

Medium

Fix versions

Ported to...

None

Feature Team

Corda Core

Severity

Medium
Configure