3 ms·
It's having a rather half-hearted schema definition language though, and the json-encoding itself contains a few fuzzy corners, lacking important data types, an
by kpil 11y ago
It's having a rather half-hearted schema definition language though, and the json-encoding itself contains a few fuzzy corners, lacking important data types, and is to be honest not particulary sophisticated.
On the other hand, it's readable, good enough for most tasks, not overly complex, and it's nicer than XML. That is not a small acomplishment.
Still... I am waiting for ASN.2 ... All good features and ideas from ASN.1 without everything bad, which is rather much too :-)
One good idea from ANS.1 is "criticality", how important a future extension to a protocol is, which means that older participants can still handle newer messages, if they contain no "critical" extensions.
Another good thing is that the encoding is detached from the schema representation, which is too good for people to appreciate. You can use the same schema to send XML, BER (original simple tag-value binary format), PER (no unneccesary bytes are sent), or plain strings. (No JSON yet - at least in the standard)
In that way, it's possible to select encoders that suits the mission. Send human-readable data when size/speed/consistency does not matter, and packed super efficient messages when sending from a space probe. Same schema.
ASN.1 is ugly as hell though, and clearly designed by committee.