Re: [vwrap] Working Draft: SNOW-375
Joshua Bell <josh@lindenlab.com> Mon, 02 August 2010 20:48 UTC
Return-Path: <josh@lindenlab.com>
X-Original-To: vwrap@core3.amsl.com
Delivered-To: vwrap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix)
with ESMTP id B2F543A6C32 for <vwrap@core3.amsl.com>;
Mon, 2 Aug 2010 13:48:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.096
X-Spam-Level:
X-Spam-Status: No, score=0.096 tagged_above=-999 required=5 tests=[AWL=-0.342,
BAYES_40=-0.185, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com
[127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16roPhxgCP3T for
<vwrap@core3.amsl.com>; Mon, 2 Aug 2010 13:48:33 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com
[209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 394663A69DC for
<vwrap@ietf.org>; Mon, 2 Aug 2010 13:48:33 -0700 (PDT)
Received: by vws10 with SMTP id 10so2495783vws.31 for <vwrap@ietf.org>;
Mon, 02 Aug 2010 13:49:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.121.210 with SMTP id i18mr4581518vcr.148.1280782140562;
Mon, 02 Aug 2010 13:49:00 -0700 (PDT)
Received: by 10.220.203.9 with HTTP; Mon, 2 Aug 2010 13:49:00 -0700 (PDT)
In-Reply-To: <4C572A6E.8070905@gmail.com>
References: <4C542CAC.1090301@gmail.com>
<AANLkTinLVdcwHGWWuXztN6EnBA5jL56iaRvX9pR54vOX@mail.gmail.com>
<4C572A6E.8070905@gmail.com>
Date: Mon, 2 Aug 2010 13:49:00 -0700
Message-ID: <AANLkTik1ukKWhNcJ0TgWfREf0YCd_oLutcxk8_j4b+=e@mail.gmail.com>
From: Joshua Bell <josh@lindenlab.com>
To: "vwrap@ietf.org" <vwrap@ietf.org>
Content-Type: multipart/alternative; boundary=001636d34ceb85ea8e048cdd5495
Subject: Re: [vwrap] Working Draft: SNOW-375
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group
<vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Aug 2010 20:48:34 -0000
On Mon, Aug 2, 2010 at 1:28 PM, Dzonatas Sol <dzonatas@gmail.com> wrote: > > In such cases for XML, I currently assume that full secure > encapsulation/canonicalization is needed to pass on sanity to non-XML > formats. If we assume XML only, then one valid XML structure is directly > implantable into another XML structure where allowed (ambiguous tags, > variable DTDs, intra-tags). I don't see a way for JSON to support > intra-tags. > > Assuming I'm understanding you correctly... As in LLSD, everything in JSON is a key or value. So you could easily have: { "somekey": "somedata", "otherdata": /* your data here */ } ... where the overall JSON payload's value is a map, and value of that map's key "otherdata" is an arbitrary JSON value in place of the C-style comment (the above is not valid JSON as written, of course). There is no capability in JSON for the included data to change the meaning of the container, so this is as "secure" as in a similar XML usage. (If you had a buggy output mechanism that didn't output values as valid fragments, then obviously the payload could render the container invalid. But this is as true with XML as with JSON - or SQL or ... /me thinks of little Bobby Tables http://xkcd.com/327/.) I have written raw XML parsers that fold and unfold structures dynamically, > and the parser knows nothing about its data or types. I could apply such > technique instead of encapsulation. > Although a JSON parser must be aware of the JSON types (object, array, string, number, true, false, null), it does not need to be aware of the interpretation of the data any more than an XML parser that is not also a validator. While this may seem slightly more complicated than XML (its just tags, right?), a fully conforming JSON parser is simpler than a fully conforming XML parser since XML is more feature-rich (whitespace rules, attributes, character entities, CDATA, namespaces, mixed content, ids, etc). So, although XML may be superior in other ways, I don't believe this is a case where JSON is inferior to XML - if I'm understanding your point correctly. > When people say they don't like XML, I know they actually mean they don't > like DTDs, which should have been a separate standard than raw XML. In my experience, everyone has a favorite XML schema language, and thinks the others are evil. :) XML has a tremendous amount of power, but most of the time you need only a small fraction of that power. (e.g. LLSD's XML serialization doesn't need namespaces, mixed content, etc). Contrariwise, XML's expressiveness lets you precisely serialize all of LLSD's types, whereas many LLSD types collapse to JSON strings.
- [vwrap] Working Draft: SNOW-375 Dzonatas Sol
- Re: [vwrap] Working Draft: SNOW-375 Joshua Bell
- Re: [vwrap] Working Draft: SNOW-375 Dzonatas Sol
- Re: [vwrap] Working Draft: SNOW-375 Joshua Bell
- Re: [vwrap] Working Draft: SNOW-375 Dzonatas Sol
- Re: [vwrap] Working Draft: SNOW-375 Dzonatas Sol
- Re: [vwrap] Working Draft: SNOW-375 Dzonatas Sol
- [vwrap] xml-org-ietf-vwrap- Re: Working Draft: SN… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dickson, Mike (ISS Software)
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol
- [vwrap] Post-Mortem Re: xml-org-ietf-vwrap- Re: W… Dzonatas Sol
- Re: [vwrap] xml-org-ietf-vwrap- Re: Working Draft… Dzonatas Sol