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

Canonicalization : sorting json property values by key if they are object type #530

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

li-ukumar
Copy link
Member

Summary

Make json property values deterministic if they are object type in Avro schema canonical form.

Description

The current version of avro schema canonical form can be non-deterministic if a json property is of object type and its internal keys may change order.
Fixing that by recursively sorting json properties alphabetically (by key name) if they are of object type.

Test

Added unit tests

@li-ukumar li-ukumar merged commit dfd1900 into master Jan 11, 2024
2 checks 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.

2 participants