@Aljoscha this is where it converts buffer to str and then json when reading from db: https://github.com/ssbc/secure-scuttlebutt/blob/master/minimal.js#L83
Isn't encode
only encoding arbitrary js values into js strings, and decode
decoding js strings into arbitrary js values? Those js strings are an internal, utf-16 encoded representation, but ssb servers exchange utf-8 encoded json. So there's still a conversion missing, and that's the one I'm after (in particular the decoding from utf-8 json into js values (and possibly with a utf-16 string as an intermediate representation)).