Uploaded image for project: 'Corda'
  1. CORDA-1905

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

    Details

      Description

      Corda defines the Amount class as:

      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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                chris.rankin Chris Rankin
                Reporter:
                chris.rankin Chris Rankin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: