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

Allow parsing padding in dag-json bytes fields #309

Merged
merged 2 commits into from
Dec 7, 2021
Merged

Conversation

willscott
Copy link
Member

While we specify that the bytes field in dag-json is canonically the un-padded variant of the base64 encoding, there are existing records / dags created on versions of this library which did use padding. We should be able to parse these nodes.

While we specify that the bytes field in dag-json is canonically the un-padded variant of the base64 encoding, there are existing records / dags created on versions of this library which did use padding. We should be able to parse these nodes.
Copy link
Collaborator

@warpfork warpfork left a comment

Choose a reason for hiding this comment

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

I'm not hyped about this, and would prefer in general if our codecs supported fewer baroque variations on data... but Postel's Principle does seem to apply in this case.

(Lesson for when we work on new codecs in the future: make a much, much bigger point of making sure we are driving with fixtures and strictness from the start.)

@willscott willscott merged commit 3191458 into master Dec 7, 2021
@willscott willscott deleted the permissivebytes branch December 7, 2021 23:44
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