Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cbor-edn instead of cbor-diag #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Use cbor-edn instead of cbor-diag #3

wants to merge 5 commits into from

Conversation

chrysn
Copy link
Owner

@chrysn chrysn commented Jun 14, 2024

It appears that cbor-diag development has stalled, while new features are coming to EDN, which cbor-edn (for context: which I am maintaining) does support by virtue of being built on the current edn-literals draft's ABNF.

This is a compatible change in that it preserves the API; any difference in behavior exceeding the amount of prettiness applied (in particular, indenting differs -- but that was announced to be volatile) would be due to a bug in either of the back-end libraries.

cbor-edn offers quite a few knobs in conversion; these are initially not shown and all hidden behind pretty (applying whatever is available) vs. non-pretty (doing the baseline).

@chrysn
Copy link
Owner Author

chrysn commented Jun 14, 2024

Note that conversions such as from 54([h'fe800000000000003c63befffe85ca96', null, 6]) to 54([ip'fe80::3c63:beff:fe85:ca96', null, 6]) were only just added to cbor-edn, and won't be available until the next update (and version bump, because there is no API stability in cbor-edn yet -- but then again, its API surface is relatively small).

This fixes small bugs around wrong encoding indicators, updates to
edn-literals' more precise encoding indicators, and enables future
extensions like application oriented literals.
All known AOLs are decoded from diag to cbor; from cbor to diag, this is
only applied in pretty mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant