We're updating the issue view to help you get more done. 

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

Affected OS

None

Severity

Medium

Target Version/s

Corda Enterprise 3.2
Corda 3.3

Feature Team

Corda Core

Fix versions

Priority

Medium