Typed netstrings were conceived by Zed Shaw as a convenient text format for exchanging small amounts of data over the network. They are meant as an alternative to JSON that are easier to handle in low-level network code. See his initial implementation here: typed netstrings in Python. And see the official specification here: tnetstrings.org.
It's a gem, so do the usual:
[sudo] gem install tnetstring