RE: [apps-discuss] Last Call: <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to Proposed Standard

"Markus Lanthaler" <markus.lanthaler@gmx.net> Fri, 14 December 2012 17:38 UTC

Return-Path: <markus.lanthaler@gmx.net>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B6DF321F85B3 for <ietf@ietfa.amsl.com>; Fri, 14 Dec 2012 09:38:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.999
X-Spam-Level:
X-Spam-Status: No, score=-0.999 tagged_above=-999 required=5 tests=[AWL=0.151, BAYES_00=-2.599, MSGID_MULTIPLE_AT=1.449]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OM0xzIX05hr7 for <ietf@ietfa.amsl.com>; Fri, 14 Dec 2012 09:38:38 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by ietfa.amsl.com (Postfix) with ESMTP id 00B2A21F897B for <ietf@ietf.org>; Fri, 14 Dec 2012 09:38:38 -0800 (PST)
Received: from mailout-de.gmx.net ([10.1.76.20]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MC6gQ-1TsKey3FSq-008rVm for <ietf@ietf.org>; Fri, 14 Dec 2012 18:38:36 +0100
Received: (qmail invoked by alias); 14 Dec 2012 17:38:36 -0000
Received: from unknown (EHLO Vostro3500) [84.115.182.43] by mail.gmx.net (mp020) with SMTP; 14 Dec 2012 18:38:36 +0100
X-Authenticated: #419883
X-Provags-ID: V01U2FsdGVkX18C4iwMq38CBurbmemGiWEHepaAVUcbDgPR6usqMP AGdG5jL/CrT7lR
From: Markus Lanthaler <markus.lanthaler@gmx.net>
To: 'James M Snell' <jasnell@gmail.com>
References: <20121211150057.28223.93310.idtracker@ietfa.amsl.com> <50cb04b9.86df440a.72fe.1e20SMTPIN_ADDED_BROKEN@mx.google.com> <CABP7RbeNsZ_rBWRjou=VG+hBhUKaOz+y1a0sSChwWiHte9znnQ@mail.gmail.com> <50cb5f33.295eb40a.7e3d.ffff919fSMTPIN_ADDED_BROKEN@mx.google.com> <CABP7Rbf9cZb1uJrkenxrGH06h-hsWSbG5PXyV6W-3Tm7aER4Ng@mail.gmail.com>
In-Reply-To: <CABP7Rbf9cZb1uJrkenxrGH06h-hsWSbG5PXyV6W-3Tm7aER4Ng@mail.gmail.com>
Subject: RE: [apps-discuss] Last Call: <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to Proposed Standard
Date: Fri, 14 Dec 2012 18:38:31 +0100
Message-ID: <021601cdda21$d6c541c0$844fc540$@lanthaler>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac3aHxjjg7lMd90fTjSw+Fg4sHvJ/wAAVshQ
Content-Language: de
X-Y-GMX-Trusted: 0
X-Mailman-Approved-At: Sun, 16 Dec 2012 08:01:45 -0800
Cc: 'IETF Discussion' <ietf@ietf.org>, 'IETF Apps Discuss' <apps-discuss@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Dec 2012 17:38:38 -0000

On Friday, December 14, 2012 6:19 PM, James M Snell wrote:

> > On Fri, Dec 14, 2012 at 9:17 AM, Markus Lanthaler wrote:
> >
> > Hmm.. I think that’s quite problematic. Especially considering
> > how JSON Pointer is used in JSON Patch.
>
> How so? Doesn't appear to be a problem in practice. 

Since it doesn't express the authors intent. For example, assume you have a JSON Patch document like the following:

   [
     { "op": "test", "path": "/1", "value": 68 },
     { "op": "add", "path": "/2", "value": 105 }
   ]

What would you expect it to do? I think almost everyone would say that it set the third element of an array to 105 iff the second value is 68. So you might expect to get back an array on success but what you really get back might be something like this: 

{
  "some": "value",
  "1": 68,
  "some other": "value",
  "and": "finally",
  "2": 105
}

Maybe having something like ~2 to express that a number is to be treated as an array index would solve it!?


--
Markus Lanthaler
@markuslanthaler