Skip to content

Implement RFC8785 - #1091

Merged
byroot merged 1 commit into
ruby:masterfrom
byroot:c14n
Oct 2, 2026
Merged

byroot merged 1 commit into
ruby:masterfrom
byroot:c14n

Conversation

@byroot

@byroot byroot commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Fix: #1038

Directly lift https://github.com/dryruby/json-canonicalization

At least for now, implementing most of the logic in Ruby make it shareable between the 3 generator implementations, largely reducing the maintenance cost.

I don't particularly expect canonicalization to be a hotspot, but if it happens to be, I'd be open to specialize the implementation, within reason, at least in the C generator.

TODO:

  • JRuby implementation
  • TruffleRuby implementation
  • Potentially raise an error when using incompatible options?

Fix: ruby#1038

Directly lift https://github.com/dryruby/json-canonicalization

At least for now, implementing most of the logic in Ruby make it
shareable between the 3 generator implementations, largely reducing
the maintenance cost.

I don't particularly expect canonicalization to be a hotspot,
but if it happens to be, I'd be open to specialize the implementation,
within reason, at least in the C generator.
@byroot
byroot merged commit f103c89 into ruby:master Oct 2, 2026
42 checks passed
@byroot
byroot deleted the c14n branch October 2, 2026 14:45
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.

Add support for JSON Canonicalization (RFC8785)

1 participant