Skip to content

CBOR usage choices: Map keys (int vs string, fp vs int etc) #20

Description

@GarethCOliver

This Issue is tracking what syntax we use in throughout the protocol in CBOR (split from #5 )

Things that we should be considering:

  • On-the-wire Size
  • Developer ergonomics
  • Ease of mapping to JSON

Map Keys:

The current proposed draft does the following:

Normatively defined keys are all int values. Extensions are String values.

This provides the most compact serialization and provides collision resistance for extensions out of the box.

Some downsides:

  • Needs more expansive tooling for debugging and read/writing requests (as keys aren't naturally)
  • Needs some mechanism to convert ints for JSON and a way to resolve collisions

In addition to this there are other questions:
How to represent bytestring, tags, fp etc

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