Skip to content

1784 json serializer decode hashref#1790

Closed
veryrusty wants to merge 3 commits intomainfrom
1784-json-serializer-decode-hashref
Closed

1784 json serializer decode hashref#1790
veryrusty wants to merge 3 commits intomainfrom
1784-json-serializer-decode-hashref

Conversation

@veryrusty
Copy link
Copy Markdown
Member

@veryrusty veryrusty commented Mar 24, 2026

Fixes for JSON serializer _ensure_characters:

The test suite will likely fail due to hash randomization with this applied, so require sorted keys (canonical representation) in encoded json (string) comparisons.

Ref::Util is_hashref will tell you if the base variable is a hashref,
even if its blessed. We should be leaving the internals of blessed
objects alone.
The tests for json serialisation are comparing strings; they need a
consistent format, canonical for sorted keys (otherwise hash key randomization
will cause failures), and pretty (for our viewing pleasure).
@veryrusty veryrusty marked this pull request as ready for review March 24, 2026 23:48
@cromedome cromedome added this to the 2.1.0 breakages milestone Mar 25, 2026
Copy link
Copy Markdown
Contributor

@cromedome cromedome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid fixes. 👍 from me. @xsawyerx???

@glance-
Copy link
Copy Markdown
Contributor

glance- commented Mar 30, 2026

Fixes the same issue for me.

@xsawyerx
Copy link
Copy Markdown
Member

@veryrusty++ !

@cromedome cromedome closed this Mar 30, 2026
@cromedome cromedome deleted the 1784-json-serializer-decode-hashref branch March 30, 2026 23:49
@cromedome
Copy link
Copy Markdown
Contributor

Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants