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

dag-json encoding should proactively reject maps that would be confusable with links during decode #155

Open
warpfork opened this issue Mar 27, 2021 · 0 comments

Comments

@warpfork
Copy link
Collaborator

The DAG-JSON encoding cannot differentiate between {a map with a single entry that has a key of "/" and a string value} and {an IPLD link}.

Therefore, in order to be reasonably bijective, and to error early rather than leave users to run into data corruption which might only be detected arbitrarily far in the future, the dagjson codec should proactively error during encode if a map would be confusable with links during decode.

This may require finalizing some details of the DAG-JSON specification more completely before being unambiguously implementable. Namely: ipld/specs#356 .

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

No branches or pull requests

1 participant