3 ms·
It doesn't have to be JSON. It just has to be in a formal syntax and semantics so we can interchange.
by cryptonector 4y ago
It doesn't have to be JSON. It just has to be in a formal syntax and semantics so we can interchange.
- skissane 4y agoSure it doesn’t have to be JSON. It could be YAML, XML, ASN.1, S-expressions, whatever. But I think JSON is a clear winner (nowadays) on the basis of being simple, easy to parse (compared to C/C++/etc which have very complex syntax), parsing libraries being extremely widely available (almost every language, even the most obscure, has a JSON parser available; languages which lack JSON support in their standard library, such as C, are now the exceptional minority.) Of course it is more voluminous and slower than a binary format. One could always define a binary encoding which straightforwardly maps to the JSON one (or just reuse an existing one such as UBJSON, BSON, CBOR, etc)
- cryptonector 4y agoVerbosity doesn't really matter in this context. Schema does. I agree that JSON is probably the best choice from among the choices you listed. (Also, ASN.1 has JSON encoding rules, FYI. ASN.1 is not just the awful DER.)