Re: [Json] Media types, extensibility in draft-ietf-json-i-json-02

"Joe Hildebrand (jhildebr)" <jhildebr@cisco.com> Sat, 05 July 2014 02:31 UTC

Return-Path: <jhildebr@cisco.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 A42DB1A02BD for <json@ietfa.amsl.com>; Fri, 4 Jul 2014 19:31:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -13.952
X-Spam-Level:
X-Spam-Status: No, score=-13.952 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, J_CHICKENPOX_45=0.6, J_CHICKENPOX_54=0.6, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 bCXzmsznjeed for <json@ietfa.amsl.com>; Fri, 4 Jul 2014 19:31:51 -0700 (PDT)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 752041A02A5 for <json@ietf.org>; Fri, 4 Jul 2014 19:31:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3744; q=dns/txt; s=iport; t=1404527511; x=1405737111; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=fg7iedXfcQYx2EUIdCSq4DiULOoDVEbxu9P5u6W7S30=; b=czLXXgfktRR5bV6TDmmNfxQNb05YU1xsSPhV/qRsuQNMoWi+ccdeCTtx ksqZ//YuCoB6zkXzjIvPbNeSZlxzXCNQA4gE9m9PUo9sJtzuvuhtjOeM8 /RZ2bab1vgzyL2Jh6r4NZ0D1JlxefoZvI5dJ3uktS2CpxeZlbeeLjjtK2 g=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AjwFAH1it1OtJV2Z/2dsb2JhbABagw5SWoJvu32HPwEZbhZ1hAMBAQEEAQEBIBE6CxACAQgOCgICJgICAiULFRACBA4FiEINrzuacxMEgSyIOYUKMweCd4FMBZp2lAyDQ4Iw
X-IronPort-AV: E=Sophos;i="5.01,605,1400025600"; d="scan'208";a="58449374"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by alln-iport-8.cisco.com with ESMTP; 05 Jul 2014 02:31:49 +0000
Received: from xhc-rcd-x01.cisco.com (xhc-rcd-x01.cisco.com [173.37.183.75]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id s652VnuJ004690 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Sat, 5 Jul 2014 02:31:49 GMT
Received: from xmb-rcd-x10.cisco.com ([169.254.15.102]) by xhc-rcd-x01.cisco.com ([173.37.183.75]) with mapi id 14.03.0123.003; Fri, 4 Jul 2014 21:31:49 -0500
From: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
To: Tim Bray <tbray@textuality.com>
Thread-Topic: [Json] Media types, extensibility in draft-ietf-json-i-json-02
Thread-Index: AQHPli3TeLKmyOx7w0yav7qrcKonZpuQpE0AgABt+gD//6MigA==
Date: Sat, 05 Jul 2014 02:31:48 +0000
Message-ID: <CFDCBD65.52A8C%jhildebr@cisco.com>
References: <CALcoZionwZ1gn0hkhq4sKcDKg3LK13+d-XvBzXUA4iHjS6PHNA@mail.gmail.com> <CAMm+LwgU5veinaNJ6ptLJ509QD3R5=LEbpfmNjZSy5C+8jfPXg@mail.gmail.com> <CAHBU6iuc2j4a5VYnrboMEMnAPxhs5i+iZxfpbfnN1oa3740TfQ@mail.gmail.com> <CALcoZioTakxzkuvrt1EgNAKS==NNskWJ1TLUjxtZ1TBGPD+EXw@mail.gmail.com> <CFDCB00F.52A7B%jhildebr@cisco.com> <CAHBU6itO8SbfwEK5ssSHCt+d8oH700w4+dK-g8mn413gmmMUVw@mail.gmail.com>
In-Reply-To: <CAHBU6itO8SbfwEK5ssSHCt+d8oH700w4+dK-g8mn413gmmMUVw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.3.140616
x-originating-ip: [10.82.224.80]
Content-Type: text/plain; charset="utf-8"
Content-ID: <E8FF96456215074B8C72633E0C34E26C@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/json/RPld_yVgJ21ZFpz39rdAGi0EF4w
Cc: Mark Baker <distobj@acm.org>, Phillip Hallam-Baker <ietf@hallambaker.com>, JSON WG <json@ietf.org>
Subject: Re: [Json] Media types, extensibility in draft-ietf-json-i-json-02
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: Sat, 05 Jul 2014 02:31:54 -0000

That's what I'd want you to do as a consumer of my service.  In a perfect
world, ECMAscript would have a third parameter on JSON.parse that was
either a boolean controlling IJSON mode (defaulted to the old behavior),
or the second parameter could either be the existing reviver function or
an object with reviver:function, ijson:bool, and whatever else needs to be
added later.  Other language/library mechanisms would then follow suit
eventually.

On 7/4/14, 8:04 PM, "Tim Bray" <tbray@textuality.com> wrote:

>So, would an I-JSON media type help in producing the desired effect? Not
>obvious to me.  In practice, I’m supposing that if I’m writing a consumer
>for JIP (Joe’s Internet Protocol) I’d toggle my JSON parser
> into I-JSON mode because I know that’s what the RFC said.
>
>
>
>On Fri, Jul 4, 2014 at 6:30 PM, Joe Hildebrand (jhildebr)
><jhildebr@cisco.com> wrote:
>
>There are times when, in the documentation for a service that is producing
>JSON, I would like to say:
>
>"If you receive a message from me that is not strictly I-JSON, I would
>prefer you treat it as an error on my part, and therefore treat my message
>as invalid, because if something went wrong enough that what I sent you
>wasn't valid I-JSON my server room is likely on fire."
>
>
>On 7/2/14, 1:42 PM, "Mark Baker" <distobj@acm.org> wrote:
>
>>On Wed, Jul 2, 2014 at 11:54 AM, Tim Bray <tbray@textuality.com> wrote:
>>> I’ll say that just on Web-architectural grounds, I think distinct data
>>> formats should have distinct Internet Media Types, and so it bothers me
>>>that
>>> we don’t have one for i-json.  But the WG couldn’t perceive any real
>>>value
>>> in having one that’s distinct from JSON’s and I didn’t have  a
>>> forceful-enough argument to move the consensus on this.
>>
>>Were there driving use cases behind I-JSON? I could imagine a
>>(atypical) scenario where it's used as a "publishing profile",
>>defining a best practice for publishers (Postel-ian style), with no
>>regard for what happens once it's consumed. You wouldn't need to say
>>anything about media types then.
>>
>>But if you want to be able to exchange I-JSON over the Web or
>>Internet, so that recipients know, e.g., not to add duplicate keys,
>>then that can only practically be indicated with a new media type.
>>
>
>
>>_______________________________________________
>>json mailing list
>>json@ietf.org
>>https://www.ietf.org/mailman/listinfo/json
>>
>
>
>--
>
>
>Joe Hildebrand
>
>
>
>
>
>
>
>
>
>
>-- 
>- Tim Bray (If you’d like to send me a private message, see
>https://keybase.io/timbray <https://keybase.io/timbray>)
>
>
>


-- 
Joe Hildebrand