dagjson.Marshal(basicnode.NewString(string(cn)),json.NewEncoder(&buf,json.EncodeOptions{}),false)// FIXME this would be a lot less irritating if we had more plumbing access to the json encoding -- we want to encode exactly one string into a buffer, it literally can't error.
tab.keySize[cn]=buf.Len()// FIXME this is ignoring charsets, renderable glyphs, etc at present.
json.Encode(basicnode.NewString(string(cn)),&buf)// FIXME this would be a lot less irritating if we had more plumbing access to the json encoding -- we want to encode exactly one string into a buffer, it literally can't error.
tab.keySize[cn]=buf.Len()// FIXME this is ignoring charsets, renderable glyphs, etc at present.
}
}
...
...
@@ -297,9 +296,7 @@ func marshal(ctx *state, n ipld.Node, w io.Writer) error {
// It doesn't colorize or anything else. To replace it with something clever that does,
// we'll have to tear deeper into the plumbing level of json serializers; will, but later.