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

Martin Thomson <martin.thomson@gmail.com> Wed, 06 June 2012 15:22 UTC

Return-Path: <martin.thomson@gmail.com>
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 4553321F88D9 for <apps-discuss@ietfa.amsl.com>; Wed, 6 Jun 2012 08:22:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.929
X-Spam-Level:
X-Spam-Status: No, score=-3.929 tagged_above=-999 required=5 tests=[AWL=-0.330, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 APHI+rLtPsTP for <apps-discuss@ietfa.amsl.com>; Wed, 6 Jun 2012 08:22:18 -0700 (PDT)
Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id AE39A21F88D0 for <apps-discuss@ietf.org>; Wed, 6 Jun 2012 08:22:17 -0700 (PDT)
Received: by bkty8 with SMTP id y8so6723920bkt.31 for <apps-discuss@ietf.org>; Wed, 06 Jun 2012 08:22:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=wZlnjwbiWfQH3LE089U+KuU95bqFySNN3iRbCzxsGvc=; b=ce5ir0m8FjuD5cXgwkK5NcwiEB7ZR4KW9skl7Eam2/Tr1qKYzQliurpSAgfWmG7xXv HbMkMYYhKjcQ2QgNBGdBRfQD6bNvP3UVU1TqDl1k+x6iGslQYqXeC804MNsfExNXohmh BUDde9CZPhlygMYY0v2lywgIHyVJQSyrGtPzM5fYkhNHGekNA/p1XNj9vIHTNXjz/8j/ AihbVuPTMP5HnnvW/cW70rIOzs6meUEmwlHLRjYdyV4yIK5zoq1jlqcB4y3eB0JOpV7J QM5/f4KkXadPf/xqwkBqn2iW01q7nurVPI6Zblwk47zv8rJLMjgqrE2pCFruWQzNNZeS Twkw==
MIME-Version: 1.0
Received: by 10.204.149.216 with SMTP id u24mr12665127bkv.36.1338996135573; Wed, 06 Jun 2012 08:22:15 -0700 (PDT)
Received: by 10.204.66.4 with HTTP; Wed, 6 Jun 2012 08:22:15 -0700 (PDT)
In-Reply-To: <9452079D1A51524AA5749AD23E00392813E630@exch-mbx901.corp.cloudmark.com>
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> <9452079D1A51524AA5749AD23E00392813E630@exch-mbx901.corp.cloudmark.com>
Date: Wed, 06 Jun 2012 08:22:15 -0700
Message-ID: <CABkgnnVhBo7v24D4FvNj-ozDk-hx5p3v9t7xhcY0j_RKOEVReA@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: "Murray S. Kucherawy" <msk@cloudmark.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
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, 06 Jun 2012 15:22:19 -0000

On 31 May 2012 09:42, Murray S. Kucherawy <msk@cloudmark.com> wrote:
> I think the right approach is to say explicitly in pointer that it's left to the application using pointer to decide whether a match failure is an error or should be handled in some other way.  There are some cases where one might abort totally, or might create the path being referenced.  Patch could, for example, abort on a "change" instruction that references a nonexistent token, while "add" referencing a nonexistent token could create the intermediate objects needed to contain the new token.

I disagree with what appears to be an emerging consensus, for one
reason.  There is an inherent ambiguity in pointers that requires a
concrete document to resolve.  Numerical indices can be used in two
contexts:

  /1 => "foo"
  { "1": "foo" }
  [ "foo" ]

Without a concrete document, I can't decide what the pointer "points" at.

That said, there is no stopping someone from going off-spec.  But I'd
prefer to keep it just that: off-spec.