6 ms·
How about Bencode[1], the data format used in Bittorrent? Values and encodings are already bijective, the format is extremely simple and it's already standardiz
by RodgerTheGreat 10y ago
How about Bencode[1], the data format used in Bittorrent? Values and encodings are already bijective, the format is extremely simple and it's already standardized and described. The only feature "SON" has which Bencode doesn't support is floating-point values, and as you imply above they are very likely to be mutilated in JSON or a subset thereof.
[1] https://en.wikipedia.org/wiki/Bencode https://en.wikipedia.org/wiki/Bencode
- seagreen 10y agoThis is the second time Bencode's been mentioned in the context of Son. I didn't know about it before, it definitely looks interesting! However if you're sending data to a service that only accepts JSON then it's obviously not an option.
- RodgerTheGreat 10y agoFair enough. Backwards compatibility is useful in some contexts.
- seagreen 10y agoBy the way, I love that Bencode is bijective. That's a really nice property for a serialization format, and even though I don't mention it on the README it's one of the goals of Son.