Subject: Re: [CDNi] XML vs JSON

From: Ben Niven-Jenkins <[email-masked]>
Date: Tue, 12 Mar 2013 22:33:04 +0000

Matt, Colleagues,

As I've said in the past my preference would be for JSON.

Reading the "Using JSON in IETF Protocols" page Francois forwarded to the list, there are a number of things called out in the section titled "The Devil Is in the Details", namely:

1) Support for non-Unicode character sets
2) Mixed Content & Markup
3) Namespaces
4) Normative Reference for JSON
5) Schemas
6) Performance

I would argue that CDNI has no requirement for (1), (2) & (3) and (4) is being fixed by the recently formed JSON WG in Apps Area.

I'm not convinced the Schema argument is a showstopper, there are proposals for JSON schemas and if folks felt strongly about having a formal schema in the CDNI specification RFCs we can pick one of those schema proposals and use it.

Performance weighs in JSON's favour (according to the link, I do not have my own experimental data to draw from as I've never tested JSON vs XML performance).

So IMO there is no compelling reason to select XML over JSON. Equally one could argue there is no compelling reason to select JSON over XML but I would argue the simplicity (& apparent performance) of JSON tips the scales in JSON's favour.

Ben

On 22 Feb 2013, at 21:12, Matt Caulfield (mcaulfie) wrote:

> Hi everyone,
> 
> While writing the CDNI metadata draft, we have been struggling with the choice between XML and JSON for encoding metadata. 
> 
> We are turning to the list for inspiration and hopefully a decision. Below is an extremely high level synopsis of the options. 
> 
> XML
>  Verbose.
>  Flexible.
>  Allows for both elements and attributes.
>  Standardized schema definition language.
>  Includes concept of namespaces.
> 
> JSON
>  Terse. 
>  Fast to parse.
>  Allows for ordered lists.
> 
> If you feel strongly one way or the other, please chime in. 
> 
> See the metadata draft for an example of both: http://tools.ietf.org/html/draft-ietf-cdni-metadata-00#section-5.4
> 
> Thanks,
> Matt
> _______________________________________________
> CDNi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cdni