Re: [Json] Call for WG Consensus to Adopt I-JSON as a WG Item in the Charter

Nico Williams <nico@cryptonector.com> Mon, 17 March 2014 15:21 UTC

Return-Path: <nico@cryptonector.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 014351A0413 for <json@ietfa.amsl.com>; Mon, 17 Mar 2014 08:21:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.044
X-Spam-Level:
X-Spam-Status: No, score=-1.044 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, IP_NOT_FRIENDLY=0.334] 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 DDcd_F02HnR9 for <json@ietfa.amsl.com>; Mon, 17 Mar 2014 08:21:45 -0700 (PDT)
Received: from homiemail-a108.g.dreamhost.com (agjbgdcfdbef.dreamhost.com [69.163.253.145]) by ietfa.amsl.com (Postfix) with ESMTP id 4A5051A042E for <json@ietf.org>; Mon, 17 Mar 2014 08:21:44 -0700 (PDT)
Received: from homiemail-a108.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a108.g.dreamhost.com (Postfix) with ESMTP id 744F92007F124 for <json@ietf.org>; Mon, 17 Mar 2014 08:21:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=GilMqVEAcEtU8nQ9HdLp yFJGe9Y=; b=UomvJZMnZfHn9sJgCa6CrvLEpsohKNVJIXgWrZJWKRzFeiiOSpL3 bTo70OqKBu+kWNakgppSFTRFdp2u2HvkmnRdKa22uE3WNdnj1xqB841Vt/J/FVm2 kNP/A+rRP61sYkwjg64TSW77KvFZFVl0UklxIPkkbclDPGH14F7ctlY=
Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a108.g.dreamhost.com (Postfix) with ESMTPSA id 299562007F120 for <json@ietf.org>; Mon, 17 Mar 2014 08:21:36 -0700 (PDT)
Received: by mail-wg0-f46.google.com with SMTP id b13so4792388wgh.5 for <json@ietf.org>; Mon, 17 Mar 2014 08:21:34 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kkKFtx2/Eia2P2Apg6sZn93V4cUlcUOaoE2ayW+tcGY=; b=KGofsOY/YXTzyfDeXnUXO6eWpO7T8loeXALII1zg8MO1Oerw+0SKTMpOvsucBd4WS7 8di6Iq3ukw2omseqhUEYw1v0A4eX6eEgWWljr9Wjina/8VzkdhiQkIbIzgZwNDmn34FX 5zrRhbXtLXozfEjGuTNhTFl2u2cNUneXX4oozuDLoUa3KJQ1rS/m1EVdI99fzBdBWJhw jeYxZlkP2jqrlJ0zQos4e4dAGYNzEq7bRe31IZ6gVeZl2sxlSU5En5/S/ABC1tcMUITg 4b+MDmnWvsmfP5UDvWMgiCELsnDf3EWhi2YFNDaqk4dppHtnRqeFnWVQTPdoseoduUnN 4Jiw==
MIME-Version: 1.0
X-Received: by 10.194.119.168 with SMTP id kv8mr6522920wjb.41.1395069694915; Mon, 17 Mar 2014 08:21:34 -0700 (PDT)
Received: by 10.216.199.6 with HTTP; Mon, 17 Mar 2014 08:21:34 -0700 (PDT)
In-Reply-To: <CAMm+LwiwyDthMb-K4aTyMPgsqYXfcorUKTFSj6+EL2Xsh4aX9g@mail.gmail.com>
References: <53238F21.2030508@cisco.com> <CAK3OfOjBTN4yXxDftOz6fkR60rPJ-c7=_DSXwwQacyVY7o5xiA@mail.gmail.com> <CAMm+LwiwyDthMb-K4aTyMPgsqYXfcorUKTFSj6+EL2Xsh4aX9g@mail.gmail.com>
Date: Mon, 17 Mar 2014 10:21:34 -0500
Message-ID: <CAK3OfOituMQgCgy9G94PXQ5j7zggCKk5oU0svxedt1ziGTV1rg@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Phillip Hallam-Baker <hallam@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/Pj3UTlFPvOy9Djj2i8U8sy1uCGY
Cc: IETF JSON WG <json@ietf.org>
Subject: Re: [Json] Call for WG Consensus to Adopt I-JSON as a WG Item in the Charter
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: Mon, 17 Mar 2014 15:21:47 -0000

On Mon, Mar 17, 2014 at 6:56 AM, Phillip Hallam-Baker <hallam@gmail.com> wrote:
> On Sun, Mar 16, 2014 at 11:51 PM, Nico Williams <nico@cryptonector.com>
> wrote:
>> My main complaint is with the recommendation/requirement that JSON
>> texts be objects at the top-level.
>>
>> Instead I would say that if there's reason to need to signal "schema"
>> metadata in-band then a) application should specify how they do that,
>> b) here's a few ways in which they might, and all their pros and cons.
>>
>> Note too that there are many apps where there's no need to signal
>> schema metadata in-band because they always have some way to
>> communicate relevant metadata out of band.
>
>
> I have no problem with this as a convention in a protocol. But I don't see
> the need for that restriction in I-JSON.

If the purpose is to signal schema metadata then I'd like to explore
other conventions and go for a "you must provide such metadata"
statement in order to make yours an I-JSON usage.

> In a protocol design the spec is going to say something like 'the encoding
> is in the I-JSON subset of JSON'. Then its going to describe the format of
> the data which for a protocol is almost always gonna be an object per
> message at the top level. Though it could be an array of objects if multiple
> requests per message are supported.

Right, imagine wrapping an array of objects in an object just to
denote schema metadata.  What a pain.  You're probably streaming the
array, so now you gotta add an object around it -- and remove it -also
in a streaming manner- on the parser side.

Or perhaps you have a sequence of objects to return... should you mark
up every one of those objects?  While streaming them?  More pain.

We should consider how this markup happens.

Incidentally, we could say that the first text in a JSON text sequence
should denote schema metadata for the rest...  That would not be so
painful.  (although it would still interfere with existing usage).

Nico
--