Skip to content

Restore optional Jason.Encoder support - #9

Merged
jeregrine merged 1 commit into
mainfrom
jason-encoder
Jul 31, 2026
Merged

Restore optional Jason.Encoder support#9
jeregrine merged 1 commit into
mainfrom
jason-encoder

Conversation

@jeregrine

Copy link
Copy Markdown
Contributor

v0.2.21 moved struct encoding to the built-in JSON.Encoder protocol, dropping the Jason.Encoder implementations and breaking downstream callers of Jason.encode!/1. Re-add Jason.Encoder impls for all caveat structs, resource set caveats, and Macfly.Action, guarded by Code.ensure_loaded?(Jason) so they only compile when the optional :jason dependency is present.

  • json_round_trip/1 test helper now asserts Jason output matches the built-in JSON output, keeping the two protocol impls in sync

v0.2.21 moved struct encoding to the built-in JSON.Encoder protocol,
dropping the Jason.Encoder implementations and breaking downstream
callers of Jason.encode!/1. Re-add Jason.Encoder impls for all caveat
structs, resource set caveats, and Macfly.Action, guarded by
Code.ensure_loaded?(Jason) so they only compile when the optional
:jason dependency is present.

- json_round_trip/1 test helper now asserts Jason output matches the
  built-in JSON output, keeping the two protocol impls in sync
- add CHANGELOG.md and bump version to 0.2.22
@jeregrine
jeregrine merged commit 300ec54 into main Jul 31, 2026
1 check passed
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