3 ms·
> Even so, parsing JSON is a well-understood problem, and there are tons of mature libraries to parse and generate it. I'd much rather work with a JSON-based pr
by shakna 4y ago
> Even so, parsing JSON is a well-understood problem, and there are tons of mature libraries to parse and generate it. I'd much rather work with a JSON-based protocol than one which made up its own wacky data format.
The same could easily be said for mbox and maildir. These have been around forever, and if you have a library for JSON, you've probably got a library for those two, as well. But parsing them tends to be less error-intensive if you hit some kind of connection interruption.
The complaint for JSON in JMAP tends to come down to - does it improve the current status quo?
- duskwuff 4y ago> But parsing them tends to be less error-intensive if you hit some kind of connection interruption. Never heard of the ">From" problem? :) mbox has a well-documented escaping problem -- many tools which parse mbox files will mistake a line which begins with the word "from" for the start of a new message. As a result, many tools which generate mbox data will insert a ">" before the start of those lines, mangling the data slightly to prevent corruption. But that's besides the point. mbox/maildir are data storage formats, not network protocols. The corresponding network protocols (POP and IMAP) have their respective problems as well, though.
- shakna 4y agoJSON's not a network protocol, either. It's a data storage format, too. :p Yes, they all have problems. That's... Our industry. You pick and choose your problems. Hence why it's easy to point out rough edges in JSON, and it's easy with mbox or maildir, too.
- addicted 4y agoHow well supported are mbox and maildir relative to JSON? Do you have multiple high quality implementations for supporting mbox or maildir in nearly every language and framework in active use today? If not, then they’re nothing like JSON.
- shakna 4y ago> Do you have multiple high quality implementations for supporting mbox or maildir in nearly every language and framework in active use today? Yes. They're builtin to Python's stdlib [0]. There's dozens for JS. Part of the PHP stdlib. [1] A number for Rust. Several for Go. And so on, and so forth. [0] https://docs.python.org/3/library/mailbox.html https://docs.python.org/3/library/mailbox.html [1] https://www.php.net/manual/en/function.imap-createmailbox.php https://www.php.net/manual/en/function.imap-createmailbox.ph...
- duskwuff 4y ago> Part of the PHP stdlib. That's an IMAP library, not mbox/maildir, and it's part of an extension, not the standard library.
- masklinn 4y ago> JSON's not a network protocol, either. It's a data storage format, too. :p JSON is a data exchange format, it’s always been intended as a way to communicate between systems. You can use it for data storage just fine, but it’s not the primary role of the format. Mbox was not designed as an exchange / interchange format, but as a storage format for MUA, with some possibility of interoperability.
- denton-scratch 4y agoThe parsing of mbox and maildir storage formats is orthogonal to the mailstore access protocol, isn't it? Does JMAP propose a new mailstore format?