-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Description
At the moment toJSON returns following fields
https://github.com/multiformats/js-multiformats/blob/master/src/cid.js#L202-L208
Last one is Uint8Array, so when you run JSON.stringify over object containing CID it gets mangled into unreadable mess because bytes are turned into object with each byte in own offset property.
Can we please either do something more useful in toJSON or drop that method entirely so that replacer function passed to JSON.stringify can handle the substitution, which currently does not happen because toJSON() is runs before replacer.
Metadata
Metadata
Assignees
Labels
No labels