You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
First of all, we have doc comments for a typedef that doesn't actually exist called "SerializedCID". The docs claim toJSON() returns this but that isn't actually true.
In our toJSON() method we return 3 properties, one of which is a Buffer and, as a result, won't be property decodable from the JSON representation.
As I started to think about what toJSON()should do I realized that the most useful thing may be returning {"/": this.baseEncodedString()}. This touches again on the discussion we're having about a canonical JSON form for links but it does seem appropriate.
The text was updated successfully, but these errors were encountered:
I'm a little confused by the
toJSON()
method.First of all, we have doc comments for a typedef that doesn't actually exist called "SerializedCID". The docs claim
toJSON()
returns this but that isn't actually true.In our
toJSON()
method we return 3 properties, one of which is aBuffer
and, as a result, won't be property decodable from the JSON representation.As I started to think about what
toJSON()
should do I realized that the most useful thing may be returning{"/": this.baseEncodedString()}
. This touches again on the discussion we're having about a canonical JSON form for links but it does seem appropriate.The text was updated successfully, but these errors were encountered: