2 ms·
Right. 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 b
by chubot 13y ago
Right. 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.