2014-07-08 21:22 GMT+02:00 Cathal (Phone) <[1]cathalgarvey@cathalgarvey.me>: Thoughts? Bencoding 2.0? tl;dr: I think it's a good idea, but it is offensive in a vague way. --- It's really unfun to suddenly see binary in your JSON file. Both for automated software that parses HTML (or something) and for people that use text editors. The motivation for JSON isn't that it's easy and not too inefficient. It's cleaner and more generic than XML. It's also faster to write because the { and } are always written in code (you find them more easily). It's just XML but a bit better. If you want efficiency you could take to templated binary blobs. It wouldn't actually be that hard, either, once we have some tools to do it. You could even have a dual request, where you request "file.binary" and "filelayout.json", where a JSON file describes the shape of the binary information file. It is actually a good idea. Definitely better than any alternatives (all none of them). Just need plugins for text editors to hide the binary when you're viewing it. And find some way to prevent binary overflow. You know how C coders love to believe a length field, then do something bad and everything goes poof. Maybe port over how attachments work in e-mail. Actually, please don't it's awful. But it shows the sort of trouble you get. It's great for some applications. I don't like that it would be good for the wrong applications too. I also think we should harness more off the power we already have, instead of thinking of new ways that are easier-but-not-actually-much-easier. I think I'd rather have a way to put JSON in front of my binary file, than a way to put binary into my JSON file. It'd be great for metadata for images, actually I've seen XML in front of PNG's and GIFS. We could use a .BJSN, a format for a (JSON, Binary) tuple. References may be better than embedding; flexibility in delivery and storage, respects both formats more, keeps JSON simpler. That's the only really valid concern I can come up with. It depends on the application field. As a webdeveloper I can see the utility and also the difficulty of good support. I think of previous trouble with binary overflow, and how it can get really really messy. I'm pro-possibility though! We should be able to do it, and leave it wherever we think that's bad. Maybe we should start calling it "JSON Transfer Protocol", though! I'm a little under the weather atm so please forgive my awkward verbosity. References 1. mailto:cathalgarvey@cathalgarvey.me