Re: [apps-discuss] json-pointer #5 - semantics [was: Feedback on draft-ietf-appsawg-json-pointer-00]

Mark Nottingham <mnot@mnot.net> Wed, 27 June 2012 02:22 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 528CA11E80FD for <apps-discuss@ietfa.amsl.com>; Tue, 26 Jun 2012 19:22:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.166
X-Spam-Level:
X-Spam-Status: No, score=-106.166 tagged_above=-999 required=5 tests=[AWL=-3.567, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X0sM1IKJV6GL for <apps-discuss@ietfa.amsl.com>; Tue, 26 Jun 2012 19:22:21 -0700 (PDT)
Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) by ietfa.amsl.com (Postfix) with ESMTP id 831D911E80EF for <apps-discuss@ietf.org>; Tue, 26 Jun 2012 19:22:21 -0700 (PDT)
Received: from mnot-mini.mnot.net (unknown [118.209.196.77]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id AA98222DD6D for <apps-discuss@ietf.org>; Tue, 26 Jun 2012 22:22:14 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Apple Message framework v1278)
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <01173171-110F-4FBE-993A-E858B51E9068@mnot.net>
Date: Wed, 27 Jun 2012 12:22:11 +1000
Content-Transfer-Encoding: quoted-printable
Message-Id: <D4A5A3DE-0822-48D3-B19F-EB0EDDF756E7@mnot.net>
References: <4F4FD8A5.6010603@cloudmark.com> <1330638350.2531.11.camel@neutron> <4F514AF9.5010506@cloudmark.com> <9452079D1A51524AA5749AD23E003928077013@exch-mbx901.corp.cloudmark.com> <01173171-110F-4FBE-993A-E858B51E9068@mnot.net>
To: IETF Apps Discuss <apps-discuss@ietf.org>
X-Mailer: Apple Mail (2.1278)
Subject: Re: [apps-discuss] json-pointer #5 - semantics [was: Feedback on draft-ietf-appsawg-json-pointer-00]
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Jun 2012 02:22:22 -0000

I've tried to address this (taking into account subsequent discussion) with:
  http://trac.tools.ietf.org/wg/appsawg/trac/changeset/67

Cheers,


On 31/05/2012, at 1:45 PM, Mark Nottingham wrote:

> 
> On 03/03/2012, at 9:47 AM, Murray S. Kucherawy wrote:
> 
>>> -----Original Message-----
>>> From: apps-discuss-bounces@ietf.org [mailto:apps-discuss-bounces@ietf.org] On Behalf Of Mike Acar
>>> Sent: Friday, March 02, 2012 2:35 PM
>>> To: apps-discuss@ietf.org
>>> Subject: Re: [apps-discuss] Feedback on draft-ietf-appsawg-json-pointer-00
>>> 
>>>>> It's easy to imagine a case where a Pointer refers to a deep
>>>>> hierarchy, e.g. /a/b/c/d, and the application semantics of following
>>>>> it are to create automatically any non-existent intermediate objects.
>>>>> 
>>>>> My initial thought was that the Pointer RFC should explicitly say
>>>>> that specs which use it (e.g. Patch) should define semantics for
>>>>> ambiguous cases (non-unique or non-existent member names, array index
>>>>> out of bounds, etc).
>>> 
>>> There is another case: What to do if a non-terminal reference token
>>> names a value which is not a structured type; e.g.
>>> 
>>> { "a" : "b" }
>>> 
>>> How should you interpret "/a/c/d"? For Patch this should be an error,
>>> but another application might promote the value of "a" from a string to
>>> an object or array. If the Pointer RFC says this MAY be an error, it
>>> disallows those semantics.
>> 
>> I don't agree that MAY disallows anything, but I do think the current expression is too mushy.
>> 
>> I think it's fine for the pointer document to say that the handling of such cases is application-specific, but it should actually say that, perhaps by using your two examples to illustrate how different applications using the pointer specification could behave.
> 
> 
> This is <http://trac.tools.ietf.org/wg/appsawg/trac/ticket/5>.
> 
> It seems like we need to add language stating that failing to match a particular token can be considered an error, or can be used by a particular application to effect some other behaviour. Make sense?
> 
> That said, personally I think of JSON-Pointer as a way to find a node in a current document, *not* a way to manipulate that document, and I'm not sure overloading its semantics are a good thing.
> 
> Cheers,
> 
> --
> Mark Nottingham   http://www.mnot.net/
> 
> 
> 
> _______________________________________________
> apps-discuss mailing list
> apps-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/apps-discuss

--
Mark Nottingham   http://www.mnot.net/