Skip to content

Make JSON encoding total & standardize it #658

@klntsky

Description

@klntsky

Currently, not every transaction can be converted to JSON. See #634 and its cause. This is not reflected in the type of to_json method.

The context of the issue is: I am pushing forward an initiative to standardize JSON representations of Cardano domain types - see this CPS for info on motivation.

In order to build a universal schema, we need a "source of truth", and preferably we would like to use one of the existing implementations. CSL looks like the best candidate, because almost every offchain library is using it already. But a non-total to_json is not an option.

I'm willing to contribute to this project. Here's what I can do:

  • Identify all sources of partiality in the JSON encoding/decoding code
  • Propose encoding adjustments
  • Implement them in code and make a PR

After that, I would produce a schema and push it through the CIP acceptance process.

Would you agree to "freeze" the JSON encoding implementations after that and only evolve them in sync with the standard (CIP)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions