-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve codec spec compliance (#174)
The DAG-CBOR, DAG-JSON and DAG-PB codecs are not more spec compliant. New negative test fixtures were added to https://github.com/ipld/codec-fixtures, with this change all pass. BREAKING CHANGE: DAG-CBOR, DAG-JSON and DAG-PB encoding and decoding is stricter. In DAG-CBOR and DAG-JSON now error when duplicated map keys with the same map are encountered. DAG-PB is now stricter on encoding and decoding. For example are links and data not allowed to be interleaved, they have to be one after another (in any order). When encoding `Ipld` to DAG-PB, the types now need to match, links need to be ordered. The DAG-PB will error if unknown data is encountered during decoding.
- Loading branch information
Showing
5 changed files
with
119 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters