Re: [Json] Consensus on JSON-text (WAS: JSON: remove gap between Ecma-404 and IETF draft)

Alex Russell <slightlyoff@google.com> Tue, 03 December 2013 01:26 UTC

Return-Path: <slightlyoff@google.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C9B7D1AE011 for <json@ietfa.amsl.com>; Mon, 2 Dec 2013 17:26:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.379
X-Spam-Level:
X-Spam-Status: No, score=-1.379 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ydkA54j6-5al for <json@ietfa.amsl.com>; Mon, 2 Dec 2013 17:26:50 -0800 (PST)
Received: from mail-qa0-x229.google.com (mail-qa0-x229.google.com [IPv6:2607:f8b0:400d:c00::229]) by ietfa.amsl.com (Postfix) with ESMTP id 51C171AE010 for <json@ietf.org>; Mon, 2 Dec 2013 17:26:50 -0800 (PST)
Received: by mail-qa0-f41.google.com with SMTP id j5so5153576qaq.0 for <json@ietf.org>; Mon, 02 Dec 2013 17:26:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=atNhf0GBOzXwTQN3RHVUHrlNKNhv0EjmKU2xG8lhzms=; b=Fgvm8f4hfd+gl9WksNZoBQDW2u6GJThIMZAeR4BzV86fXu/77h7v6KQE3SlStA+9kI 3NK1+giMmGovZtL4t23A6cwKHJz1a7i27zBZcu+pAt5S1qhJpMdI4suG2qunGuBqDqoT 7G+5VdozktLYB9skzIq171kBfeYfBm62+b3xQeLKucCV8ueIdI3ttTJks3kdcF0j5P2v ePZq0W35CPhU0iSsLW52JNygvY/Oly6pkXyYRCrbywV5n55532YdVXHmyia+8CqUIpjr yGpPkXfFmAcdap3964QEM5lLIpmqsZ1YJbi4ii6SvCZgPwUDvjopPlvFhmhQlVhfgvSv BPOA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=atNhf0GBOzXwTQN3RHVUHrlNKNhv0EjmKU2xG8lhzms=; b=QqIkILJbgkyki/s7LQu3Fukr8qrbldSPMdpQOS1NNnj1PMxz+4WIS/jj0QUzklFCFH LCGrxI6qkEMTf31iYLmj0B5AKAReh3o1r7DAbX/Ufr8hITnoO1jP2jIGQlm+zn2K85QA J5BByt0NytTzlQwQD3mHYwMTT+No/SlPnrOCJqZpX49dn28bCNMYUiXMHBmjfOUqMuqO u2Nj+balDGCWcFaLGQJ1t06w8SfxGZ6JamatwD6juYzD/1y8i2aQ+7+P/HrSfndE5d1R NVd1kuZpxkU5V/+6UL3WtVzbOV2AQvBSZQWYqfgbrDkzgsHHLhVhrTAX16WyPS4BRnp0 9AdQ==
X-Gm-Message-State: ALoCoQm1k/kSAad7seOSzxN/RQBApL9hGmTd3KIYu1F9zk8WlxNafYol1tjQ8aopZNPRgDGbucBL2lk6cisv4VBNTUztQyUU9SkwJcvbUkDu2AkYV2htP/lRaoSpBdOGegkaAd9af1CidtYLLD+KcswljEe5fedCLrjT/Fg8rxVLif++7CesVbpKs3O1feKvFT8CHf2E6zo7
X-Received: by 10.224.60.193 with SMTP id q1mr76013128qah.99.1386034007386; Mon, 02 Dec 2013 17:26:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.96.138.195 with HTTP; Mon, 2 Dec 2013 17:26:17 -0800 (PST)
In-Reply-To: <CAMm+Lwh-VNdtTRj6=keGMWbANDqQKbj6CODtwe1rquU8H7+32w@mail.gmail.com>
References: <CADnb78h8AjPcQLOCwNm0Pt3pObh6uFV5+zy0c_YU6B-u4MtY1Q@mail.gmail.com> <AA45B3C6-1DC5-4B1E-8045-C9FE76022584@vpnc.org> <C93F89AD-81D2-4489-ADC4-AB05A5B10883@cisco.com> <CAHBU6itgE9=WP+c0oXt1W647b1zz+N6+4ZqRa63Ve91TUsGzTA@mail.gmail.com> <CANr5HFVhG5SNhW4yJxDicvFman94FaNi8UZHhcpQbH6AG6pfQg@mail.gmail.com> <CAHBU6it-yHeHVY+3EFvPd0pVu4uLLdH3Gmz53LL4DZWJSyyUuQ@mail.gmail.com> <6C28E0DD-5E45-42DB-A915-795EE0A489CC@w3.org> <CAMm+Lwh-VNdtTRj6=keGMWbANDqQKbj6CODtwe1rquU8H7+32w@mail.gmail.com>
From: Alex Russell <slightlyoff@google.com>
Date: Mon, 02 Dec 2013 17:26:17 -0800
Message-ID: <CANr5HFXS3jc+E_q7yrNO7abhh+Qoxz5a6kuTog12Gg=bV-W6tA@mail.gmail.com>
To: Phillip Hallam-Baker <hallam@gmail.com>
Content-Type: multipart/alternative; boundary="001a1133dee6a85c1204ec973047"
Cc: Tim Berners-Lee <timbl@w3.org>, IETF Discussion <ietf@ietf.org>, JSON WG <json@ietf.org>, Tim Bray <tbray@textuality.com>, "Matt Miller (mamille2)" <mamille2@cisco.com>, "www-tag@w3.org" <www-tag@w3.org>, es-discuss <es-discuss@mozilla.org>
Subject: Re: [Json] Consensus on JSON-text (WAS: JSON: remove gap between Ecma-404 and IETF draft)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 01:26:52 -0000

On Mon, Dec 2, 2013 at 1:30 PM, Phillip Hallam-Baker <hallam@gmail.com>wrote:

> On Wed, Nov 27, 2013 at 11:51 PM, Tim Berners-Lee <timbl@w3.org> wrote:
>
> JSON is interesting in being a subset of ECMAscript.  That is a big
>> dependency -- will it be preserved?
>> However as it is unwise to feed JSON into an ECMAscript processor for
>> security reasons, that dependency may not affect code, just mean that JSON
>> and ECMAscript parsers can share parts at  the moment.
>>
>
> As I see it, encoding X is a subset of encoding Y if and only if an
> encoder for X will only produce outputs that are valid inputs of encoding Y.
>
> If an issue was to occur it would be because encoding Y has changed or the
> definition of Y has changed.
>
>
> One could imagine that the arc of ECMAscript's evolution could end up
>> having all kinds of impact on the data structure syntax and semantics.
>> (unordered sets as alternative to lists? who knows).  So in that case one
>> could imagine pressure to make a new version of JSON to match.
>>
>
> Since we are talking about a serialization format, the distinction between
> unordered sets and lists cannot occur at the wire level and this is where
> we need interoperation.
>
> I do in fact have a schema compiler for JSON that allows an interface to
> specify a set of entries rather than a list. But they are only ever
> serialized as lists.
>
> Yes, literal ISO dates and dateTimes -- I added them to my own N3/turtle
>> parsers without much fanfare, wish they had been put in the Turtle language
>> too.  Maybe they will.
>>
>
> And you probably do exactly what I do and represent a DateTime
> representation as a subset of String just as byte, int16, int32, int64,
> uint* are all subsets of Integer.
>
> One of the things I think we have learned from JSON is that a
> self-describing format only needs to specify the abstract type of the datum
> and not the representation.
>
> For convenience, I allow a schema to specify the size of an integer and
> whether it is signed or unsigned so that the code generator can create
> appropriate code bindings. But none of that shows up on the wire, nor is
> that particularly helpful.
>
>
> What we are doing at this point is to fix a version of the JSON encoding
> in time so that when a client and server are negotiating use of JSON
> encoding, both sides know what is being negotiated.
>
> So hopefully JSON does not change in future, only the description of JSON.
>
>
> That is not the same as saying that JSON meets all possible current and
> future protocol needs. It does not. It is not possible to pass binary data
> efficiently for a start and using decimal for floating point representation
> is likely to make the format unacceptable for serious data applications
> since it introduces conversion errors.
>
> The next question is whether those unmet needs should be addressed by an
> entirely new encoding with a completely new syntax and structure or whether
> we could extend the JSON model. My view is that we should do the second.
>

This seems entirely reasonable, so long as this extension is not called
"JSON" (assuming it adds new grammar productions). Hence the request to
normatively cite ECMA-404 and re-name any IETF-produced spec to reflect
that it is intended to be a media-type registration (or extension document
for protocol authoring, etc.), not an alternate (and therefore perhaps
extensible) definition of JSON.


> XML is fine for documents but it is not meeting my needs as a protocol
> designer. I find XML Schema to be unnecessarily confusing and baroque, the
> schema validation features supported don't help me in application
> protocols. XML does not support binary encoding of cryptographic data or
> floating point.
>
> There are many data encodings on offer but I would like to be able to
> write one decoder that can consume a data stream that contains basic JSON
> data and JSON with extensions. This makes negotiating an encoding in a Web
> service easy, the consumer states which encodings are acceptable and the
> sender makes sure what is sent is compatible, downgrading the encoding to
> the level accepted if necessary.
>
> --
> Website: http://hallambaker.com/
>