Re: The "CBOR Everywhere" Project

On Thu, 2022-12-15 at 05:19 +0100, Anders Rundgren wrote:
> For me it is obvious that developers of new designs should seriously
> consider CBOR as an alternative to JSON and XML:
> 
> https://github.com/cyberphone/cbor-everywhere

A couple of notes...

XML is a format designed not only to interchange information between
applications, but also to mediate between human and computer - it can
be human-readable and text-editable, especially when used for
documents. Consider Docbook, XHTML, JATS, etc. In particular XML has
support for 'mixed content", also known as "rich text", such as
paragraphs with a mixture of text and markup or formatting.

There is a binary format for interchanging XML that uses server-side
parsed event streams, so the client doesn't need to do parsing. This
can be super efficient, and is also used by IOT devices (as a more
efficient alternative to JSON). The format can also use a grammar to
reduce entropy - if you know an A is followed by a B and then a C, just
transmit the data, not the names. And so on.

XML is not, intended for arbitrary binary interchange. It does,
however, feature name-based user-defined typing, e.g.
"MetricDistanceInMetres" or whatever, via XML Schema.

XML is best used when the owners of the information are not the owners
of the applications reading it - e.g. authors writing documentation can
choose any XML editor, and the documents will work in any application -
where JSON is a strong fit for where the application developer controls
the format.

liam

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

Received on Friday, 16 December 2022 03:57:46 UTC