Home > Back-end >  Is there any demerits in using rich JSON string input to as a field in Corda state to ledger?
Is there any demerits in using rich JSON string input to as a field in Corda state to ledger?

Time:11-17

Is there any demerits in using rich JSON string input to as a field in Corda state for transactions instead of data classes in terms of

  1. serialisation deserialisation
  2. In migration scenarios

CodePudding user response:

Not for the two cases you mention, but it might be harder to query this kind of data direct (via vault or even database queries), as opposed to structured data classes.

CodePudding user response:

For any meaningful application I would never recommend storing information for a Corda state as a json string. The advantage of structuring data is essentially the similar to the benefits we see from normalizing data. Querying, filter, searching and sorting across many fields can be supported by the ledger; as opposed to having to write code in the application to search, sort and filter.

  • Related