Skip to content

Fix atjson-mode round-trip edge-cases #10

@DavidBuchanan314

Description

@DavidBuchanan314

Current behaviours:

>>> cbrrr.encode_dag_cbor({"$bytes": "aa", "abc": "def"}, atjson_mode=True)
b'\xa2cabccdeff$bytesbaa' # should raise exception, not valid under atproto data model
>>> cbrrr.decode_dag_cbor(cbrrr.encode_dag_cbor({"$bytes": False}), atjson_mode=True)
{'$bytes': False} # should raise exception during decode, not valid under atproto data model

(same for $link)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions