Subject: [paws] JSON vs XML

From: <[email-masked]>
Date: Fri, 7 Sep 2012 20:41:10 +0000

The chairs discussed with the AD, and we came up with the following action plan to drive this wg to a consensus on the json vs xml encoding:
we'll collect an objections list for json and one for xml, listing what is seen wrong/problematic with that encoding. The chairs and the wg will go through that list and see if the objections are valid, then decide which encoding has more support and choose that one. If we end up with good objections list for both, we may choose to support both encodings, as that list will justify the decision once the document advances to the iesg.

I went through the emails and I found so far the following valid objections:

xml:
too verbose, may be a problem to be supported in embedded devices
current trend for APIs in the browsers is towards json

json:
some data structures are  encoded in xml, a json encoding for those would need to be defined (which is not impossible, but requires some extra work)

If you have additional objections, send them to the list asap.

-          Gabor

---

From: Zhulei <[email-masked]>
Date: Mon, 10 Sep 2012 07:58:40 +0000

Hi,

Actually, no so much comments on this choosing. I just do not think xml is a problem to embedded devices, in fact xml is well supported by different sort of devices in my view. The issue may be some power and bandwidth constrained devices (e.g. some smart objects) to support txt based information. Let’s ignore this case since we are not to define binary encoding at the moment.

Best regards,
Zhu Lei

发件人: [email-masked] [mailto:[email-masked]] 代表 [email-masked]
发送时间: 2012年9月8日 4:41
收件人: [email-masked]
主题: [paws] JSON vs XML

The chairs discussed with the AD, and we came up with the following action plan to drive this wg to a consensus on the json vs xml encoding:
we’ll collect an objections list for json and one for xml, listing what is seen wrong/problematic with that encoding. The chairs and the wg will go through that list and see if the objections are valid, then decide which encoding has more support and choose that one. If we end up with good objections list for both, we may choose to support both encodings, as that list will justify the decision once the document advances to the iesg.

xml:

json:

-        Gabor

---

From: <[email-masked]>
Date: Thu, 13 Sep 2012 23:40:07 +0000

There was not much feedback on the list about the objections to the different encodings.

We seem to agree that:
xml may not be the right choice because the current trend for APIs in the browsers is towards json; and
if we choose  json, as some data structures PAWS may reuse are  encoded in xml, a json encoding for those would need to be defined (which is not impossible, but requires some extra work)

The latter of the two objections will not be valid when we'll send the document to iesg, as all the encodings will have to be in place at that time.
So we are left with practically one question: do we want to follow the current industry trend and use json, or do we want to stick with xml.

A significant number of people prefer to specify both encodings, but that may not be agreeable with the iesg.

This is where we stand now, deadlocked on this not critical issue.

Any suggestion on how to move forward would be appreciated.

- Gabor

From: ext Zhulei [mailto:[email-masked]] 
Sent: Monday, September 10, 2012 12:59 AM
To: Bajko Gabor (Nokia-CIC/SiliconValley); [email-masked]
Cc: Zhulei
Subject: Re: JSON vs XML

Hi,

Best regards,
Zhu Lei

xml: 

json:

- Gabor

---

From: Zhulei <[email-masked]>
Date: Fri, 14 Sep 2012 04:16:59 +0000

Hi,

I really went through e-mail discussions on this. My proposal is to use json as data model of paws protocol issued by paws, in case that wg addresses the trend of APIs of browser venders and keep some discovery mechanisms open for any extra works. At the same time, we have some problems to satisfy the needs to reuse ws schema encoded by traditional devices, which will issue a separate wg document for xml encoding standard for xml supporting industries.

The reasons doing this are not technical issues, just we have broad requirements to reuse TSWS generally for communication purposes, including smart objects, ad hoc use, browser API, wifi broadband, cellular etc. 

Best regards,
Zhu Lei

-----邮件原件-----
发件人: [email-masked] [mailto:[email-masked]] 
发送时间: 2012年9月14日 7:40
收件人: Zhulei; [email-masked]
主题: RE: JSON vs XML

We seem to agree that:

- Gabor

Hi,

Best regards,
Zhu Lei

xml: 

json:

- Gabor

---

From: Paul Lambert <[email-masked]>
Date: Fri, 14 Sep 2012 12:34:11 -0700

I do not see why we are designing for "browser vendors" when we are developing protocols for radios.  

As I've said before ... real protocols use TLVs 

It is possible to map JSON strucutures to TLVs for efficiency if anyone is interested ...

Paul

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> Zhulei
> Sent: Thursday, September 13, 2012 9:17 PM
> To: [email-masked]; [email-masked]
> Subject: Re: [paws] JSON vs XML
> 
> Hi,
> 
> I really went through e-mail discussions on this. My proposal is to use
> json as data model of paws protocol issued by paws, in case that wg
> addresses the trend of APIs of browser venders and keep some discovery
> mechanisms open for any extra works. At the same time, we have some
> problems to satisfy the needs to reuse ws schema encoded by traditional
> devices, which will issue a separate wg document for xml encoding
> standard for xml supporting industries.
> 
> The reasons doing this are not technical issues, just we have broad
> requirements to reuse TSWS generally for communication purposes,
> including smart objects, ad hoc use, browser API, wifi broadband,
> cellular etc.
> 
> Best regards,
> Zhu Lei
> 
> -----邮件原件-----
> xml may not be the right choice because the current trend for APIs in
> the browsers is towards json; and if we choose  json, as some data
> structures PAWS may reuse are  encoded in xml, a json encoding for
> those would need to be defined (which is not impossible, but requires
> some extra work)
> 
> The latter of the two objections will not be valid when we'll send the
> document to iesg, as all the encodings will have to be in place at that
> time.
> So we are left with practically one question: do we want to follow the
> current industry trend and use json, or do we want to stick with xml.
> 
> Actually, no so much comments on this choosing. I just do not think xml
> is a problem to embedded devices, in fact xml is well supported by
> different sort of devices in my view. The issue may be some power and
> bandwidth constrained devices (e.g. some smart objects) to support txt
> based information. Let’s ignore this case since we are not to define
> binary encoding at the moment.
> 
> Best regards,
> Zhu Lei
> 
> The chairs discussed with the AD, and we came up with the following
> action plan to drive this wg to a consensus on the json vs xml
> encoding:
> we’ll collect an objections list for json and one for xml, listing what
> is seen wrong/problematic with that encoding. The chairs and the wg
> will go through that list and see if the objections are valid, then
> decide which encoding has more support and choose that one. If we end
> up with good objections list for both, we may choose to support both
> encodings, as that list will justify the decision once the document
> advances to the iesg.
> 
> some data structures are  encoded in xml, a json encoding for those
> would need to be defined (which is not impossible, but requires some
> extra work)
> 
> 
> _______________________________________________
> paws mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/paws

---

From: "Benjamin A. Rolfe" <[email-masked]>
Date: Fri, 14 Sep 2012 16:22:48 -0700

> It is possible to map JSON strucutures to TLVs for efficiency if anyone is interested ...
Yes I'm interested.

Ultimately for many TVWS devices in my world, the information provided 
by PAWS (be it XML or JSON) will be mapped to a compact binary 
representation that will look a lot like TLVs.

-Ben

---

From: <[email-masked]>
Date: Wed, 19 Sep 2012 17:09:23 +0000

I can sense an agreement that we can go ahead and use json encoding (only).

I would then go ahead and instruct the editor to encode the data model with json in the merged draft.

- Gabor

-----Original Message-----
From: ext Zhulei [mailto:[email-masked]] 
Sent: Thursday, September 13, 2012 9:17 PM
To: Bajko Gabor (Nokia-CIC/SiliconValley); [email-masked]
Subject: Re: JSON vs XML

Hi,

Best regards,
Zhu Lei

-----邮件原件-----
发件人: [email-masked] [mailto:[email-masked]]
发送时间: 2012年9月14日 7:40
收件人: Zhulei; [email-masked]
主题: RE: JSON vs XML

We seem to agree that:
xml may not be the right choice because the current trend for APIs in the browsers is towards json; and if we choose  json, as some data structures PAWS may reuse are  encoded in xml, a json encoding for those would need to be defined (which is not impossible, but requires some extra work)

- Gabor

Hi,

Best regards,
Zhu Lei

xml: 
too verbose, may be a problem to be supported in embedded devices current trend for APIs in the browsers is towards json

json:

- Gabor

---

From: Peter McCann <[email-masked]>
Date: Wed, 19 Sep 2012 17:18:31 +0000

Should we split off the JSON encodings of geographic locations and contact
information into separate documents, so they can be re-used by others?

Should we urge ECRIT (or some other working group) to re-specify LoST
in JSON encoding?  Or should we do the equivalent work here in PAWS?

-Pete

[email-masked] wrote:
> I really went through e-mail discussions on this. My proposal is to
> use json as data model of paws protocol issued by paws, in case that
> wg addresses the trend of APIs of browser venders and keep some
> discovery mechanisms open for any extra works. At the same time, we
> have some problems to satisfy the needs to reuse ws schema encoded by
> traditional devices, which will issue a separate wg document for xml
> encoding standard for xml supporting industries.
> 
> document to iesg, as all the encodings will have to be in place at
> that time.
> Actually, no so much comments on this choosing. I just do not think
> xml is a problem to embedded devices, in fact xml is well supported by
> 发件人: [email-masked] [mailto:[email-masked]] 代表
> [email-masked] 发送时间: 2012年9月8日 4:41 收件人: [email-masked] 主题: [paws]
> JSON vs XML
> 
> action plan to drive this wg to a consensus on the json vs xml encoding:
> is seen wrong/problematic with that encoding. The chairs and the wg will
> go through that list and see if the objections are valid, then decide
> which encoding has more support and choose that one. If we end up with
> good objections list for both, we may choose to support both encodings,
> as that list will justify the decision once the document advances to the
> iesg.
>

---

From: <[email-masked]>
Date: Wed, 19 Sep 2012 20:18:56 +0000

Inline:

-----Original Message-----
From: ext Peter McCann [mailto:[email-masked]] 
Sent: Wednesday, September 19, 2012 10:19 AM
To: Bajko Gabor (Nokia-CIC/SiliconValley); Zhulei; [email-masked]
Subject: RE: JSON vs XML

Should we split off the JSON encodings of geographic locations and contact information into separate documents, so they can be re-used by others?
<Gabor> Yes, I think that would make a lot of sense. We need to identify the data structures we want to re-use in paws, and it is not only the location ones, but possibly other stuff like vCard, iCal, etc. I'll try to put together a potential list of data structures paws may want to reuse, in the next couple of days. We will then just need some volunteers who could write up the json encoding of those data structures.

Should we urge ECRIT (or some other working group) to re-specify LoST in JSON encoding?  Or should we do the equivalent work here in PAWS?
<Gabor> We do not have a formal decision in this WG on how to do DB discovery yet, whether we use LoST or sg else. Let's have some more discussion on DB discovery first, and once we know how to do discovery, we can come back to this question.

- Gabor

-Pete

[email-masked] wrote:
> [email-masked] 发送时间: 2012年9月8日 4:41 收件人: [email-masked] 主题: 
> [paws] JSON vs XML
> 
> we’ll collect an objections list for json and one for xml, listing 
> what is seen wrong/problematic with that encoding. The chairs and the 
> wg will go through that list and see if the objections are valid, then

---

From: "Stine, John A." <[email-masked]>
Date: Wed, 19 Sep 2012 22:06:29 +0000

I do not know if I agree with this or not.  This appears to be an area where many of us, including myself, are not the experts.   

I asked someone who is what the pros and cons are with using JSON versus XML.  These are his thoughts

"If all you are going to do is have a browser that runs JavaScript then JSON is fine.

But if you want to exchange data between web services, transform the data, or query the data, then XML is the way to go. XML is 14 years old (if you consider that XML has its ancestry in SGML, then you could argue that XML is 37 years old). JSON is at best 10 years old. There are no validation tools for JSON, no transformation tools (unless you want to write JavaScript code), no query tools.

Regarding embedded systems: I am told that many of the cellphone vendors are using XML. To address the verboseness of XML, they use the standard binary XML format called Efficient XML Interchange (EXI)."

It would appear to me that with JSON you are forcing the use of JavaScript and to do a whole lot more coding but with XML you would be much more flexible and have many more tools to support you.

John

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of [email-masked]
Sent: Wednesday, September 19, 2012 1:09 PM
To: [email-masked]; [email-masked]
Subject: Re: [paws] JSON vs XML

- Gabor

-----Original Message-----
From: ext Zhulei [mailto:[email-masked]] 
Sent: Thursday, September 13, 2012 9:17 PM
To: Bajko Gabor (Nokia-CIC/SiliconValley); [email-masked]
Subject: Re: JSON vs XML

Hi,

Best regards,
Zhu Lei

-----邮件原件-----
发件人: [email-masked] [mailto:[email-masked]]
发送时间: 2012年9月14日 7:40
收件人: Zhulei; [email-masked]
主题: RE: JSON vs XML

We seem to agree that:

- Gabor

Hi,

Best regards,
Zhu Lei

xml: 

json:

- Gabor

---

From: Vincent Chen <[email-masked]>
Date: Wed, 19 Sep 2012 18:30:39 -0700

Hi,

As clarification:
 - JSON does not require JavaScript or a Browser.  It is a text-based
representation of data that is language independent, yet well-matched to
all major languages.
 - Simple-to-use libraries exist for all major languages/platforms. No
complex transformation tools needed.

JSON is not good at representing documents; XML is great for that. We're
interested in representing "data", not "documents".

-vince

On Wed, Sep 19, 2012 at 3:06 PM, Stine, John A. <[email-masked]> wrote:

> I do not know if I agree with this or not.  This appears to be an area
> where many of us, including myself, are not the experts.
>
> But if you want to exchange data between web services, transform the data,
> or query the data, then XML is the way to go. XML is 14 years old (if you
> consider that XML has its ancestry in SGML, then you could argue that XML
> is 37 years old). JSON is at best 10 years old. There are no validation
> tools for JSON, no transformation tools (unless you want to write
> JavaScript code), no query tools.
>
> Regarding embedded systems: I am told that many of the cellphone vendors
> are using XML. To address the verboseness of XML, they use the standard
> binary XML format called Efficient XML Interchange (EXI)."
>
> It would appear to me that with JSON you are forcing the use of JavaScript
> and to do a whole lot more coding but with XML you would be much more
> flexible and have many more tools to support you.
>
> John
>
>

---

From: Peter Stanforth <[email-masked]>
Date: Thu, 20 Sep 2012 14:18:59 -0400

And I thought a "document" was "data". Seriously though the question for the device guys is. Do they use the same platforms as the IT guys. In my experience we never have, but then I was generally writing radio software in machine code - showing my age

Peter Stanforth

On Sep 19, 2012, at 9:30 PM, "Vincent Chen" <[email-masked]<mailto:[email-masked]>> wrote:

Hi,

As clarification:
 - JSON does not require JavaScript or a Browser.  It is a text-based representation of data that is language independent, yet well-matched to all major languages.
 - Simple-to-use libraries exist for all major languages/platforms. No complex transformation tools needed.

JSON is not good at representing documents; XML is great for that. We're interested in representing "data", not "documents".

-vince

On Wed, Sep 19, 2012 at 3:06 PM, Stine, John A. <[email-masked]<mailto:[email-masked]>> wrote:
I do not know if I agree with this or not.  This appears to be an area where many of us, including myself, are not the experts.

John

_______________________________________________
paws mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/paws

---

From: "Rosen, Brian" <[email-masked]>
Date: Fri, 21 Sep 2012 09:00:42 -0400

First we have to decide we want to use LoST.  I favor that, of course.  Then chairs can discuss with ecrit chairs on the best way to proceed.

Brian