3 ms·
> I think netstrings provide a good and dirt simple format so netstrings is basically tlv encoded strings ? since it is always going to encode strings, the 't'
by signa11 13y ago
> I think netstrings provide a good and dirt simple format
so netstrings is basically tlv encoded strings ? since it is always going to encode strings, the 't' part can be omitted to just have 'lv' ?
- chubot 13y agoRight. Zed Shaw actually did a typed version: http://tnetstrings.org/ http://tnetstrings.org/ I played around with this. I'm on the fence on whether it has benefits over say plain netstrings + JSON. It's less human readable, and sometimes it's bigger than JSON. The encoder and decoder is a lot simpler, but that hardly matters because JSON is everywhere. JSON by itself is a little lacking because you can't encode arbitrary binary values. But if you just add plain netstrings, you have the ability to encode anything -- data in efficient formats, and metadata with types in human readable JSON.