Subj : Re: Is binkp/d's security model kaputt? To : Oli From : tenser Date : Thu Sep 23 2021 02:17 am On 22 Sep 2021 at 11:41a, Oli pondered and said... Ol> IMHO: Ol> Ol> 1.) JSON sucks. Why do you think so? Ol> (No idea why I pitched the idea to use JSON instead of XML to the Ol> CouchDB guys) Oh, so are you the guy to blame for that? :-) XML is heavyweight and ugly; it's only really interesting property is preservation of whitespace. Ol> 2.) It's especially stupid as a format for encoding mails. It sucks for Ol> 8-bit text that is not UTF-8. You have to escape everything and/or do Ol> charset translation. This I disagree with; for BBS-style emails it's fine. It's ubiquitous, libraries to handle it exist in just about every language, it's extensible, self-describing, etc. But I'm open to other ideas: what would you recommend instead? Ol> 3.) You cannot transport binary data without encoding it to base64 or Ol> something similar first. That's fair, but BBS networks aren't moving enough traffic to care. Ol> Of course you can encode the header fields in JSON and get the message Ol> body as a binary blob via another HTTP request. Maybe just use a Ol> variation of JMAP (https://jmap.io/spec-mail.html)? Possibly. With Content-Type headers one could also just send zip files or whatever. Ol> I still don't see the appeal in using text based protocols and Ol> interchange formats. Extensibility, debugability, self-describing semantics, ease of production and consumption, avoiding byte-ordering and fixed-length limitations; a whole host of things. But I'm not wedded to the idea. Hell, if someone wants to define a serialization using protocol buffers or similar, I'm game. Ol> 4.) JSON sucks for config files too. Actual JSON, yes. HJSON and JSON5, I disagree. I wrote a passable parser for JSON5 in ~100 lines of SML, and it makes a dandy config file format: http://fat-dragon.org/post/json5/ --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64) * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101) .