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

James M Snell <jasnell@gmail.com> Sun, 06 January 2013 04:55 UTC

Return-Path: <jasnell@gmail.com>
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 C84D521F86C4; Sat, 5 Jan 2013 20:55:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Level:
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 DRtl7gQwfgIO; Sat, 5 Jan 2013 20:55:53 -0800 (PST)
Received: from mail-ia0-f171.google.com (mail-ia0-f171.google.com [209.85.210.171]) by ietfa.amsl.com (Postfix) with ESMTP id 7209521F86C2; Sat, 5 Jan 2013 20:55:53 -0800 (PST)
Received: by mail-ia0-f171.google.com with SMTP id k27so15146355iad.16 for <multiple recipients>; Sat, 05 Jan 2013 20:55:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=/JERQDQf9uDDkvBq41BVGCG4CD7+NP7w3V0emDQU7Uw=; b=Wp0CM3kstpkPa0/WhRKXWUZCytcBqCt/Fd10arLafkZ7GUxmaTO+tbt8ZnfgNGYcCU ryeEIDp0nZWYaXel5YsbhZ2MXkG1vnOXmyV9aDSKxZfQx5Q5d1Paknm1tAGbnytAH9Tk 4XJ8XbBakI3DZX8iVOF4rHpCMVih9XIhmSiIHgibFik24Jjt0EAJqufkeTrfjwHZlDqz DDA0MiJoP2NblMCy8EyIUQnKhltGvJ9heUDUuAfJ+hkk5PndnJhSnfJ+aeXLesEtUtKx X3ldVsj3RG8zsmJHB/cXjpPcYEg8Lprv+gzUVgy+uhSTC3OlXHixZQ8gXVQC9NebuA0+ FtQg==
MIME-Version: 1.0
X-Received: by 10.50.178.10 with SMTP id cu10mr2721943igc.75.1357448152974; Sat, 05 Jan 2013 20:55:52 -0800 (PST)
Received: by 10.64.7.19 with HTTP; Sat, 5 Jan 2013 20:55:52 -0800 (PST)
Received: by 10.64.7.19 with HTTP; Sat, 5 Jan 2013 20:55:52 -0800 (PST)
In-Reply-To: <CAChr6Sw_GJUE715G_E9DBSz57OvtVjzpU69nk9WwJzz3NPg8AA@mail.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> <50cb5f3c.694c420a.38fb.39afSMTPIN_ADDED_BROKEN@mx.google.com> <CAChr6SxZRc3B_HCbw76kLe2dsRSr43r-gLpfMVnCUfJTrZdTLA@mail.gmail.com> <CABP7RbfA33huBFadMeXTTEt=MkjW8-d4DFH7+GLXGurnm9sSRw@mail.gmail.com> <CAOXDeqpPE4eNy_qJpDPdPHbCQakG9-hDcNZ3Sj9r4kWedByVzQ@mail.gmail.com> <CAChr6SwtS_=iS-k4mJm1vHjEvvGVzay5jDYeGheqsPZqO-89CQ@mail.gmail.com> <EABB8F51-C3B4-49F5-8672-5C2ABAC7043A@mnot.net> <CAChr6Sx7JdKM91EwJaSZ0Ra_F4FSqkuc3vzTY1LM=F_8sWho+Q@mail.gmail.com> <263BA4B0-6401-4391-A369-A90863D9A4BC@mnot.net> <CAChr6Sw-hZwzB423qvkqyGfq8Aw6Jry-=B9zSzgp2GwbX6gQQg@mail.gmail.com> <E17FB936-BB87-4711-BEFB-21714B746B71@mnot.net> <CAChr6Sw_GJUE715G_E9DBSz57OvtVjzpU69nk9WwJzz3NPg8AA@mail.gmail.com>
Date: Sat, 05 Jan 2013 20:55:52 -0800
Message-ID: <CABP7RbcQARMAvisv4zUPX7+t97MQ_vwizBCiUBt6Nc7y7CapYQ@mail.gmail.com>
Subject: Re: [apps-discuss] Last Call: <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to Proposed Standard
From: James M Snell <jasnell@gmail.com>
To: Rob Sayre <sayrer@gmail.com>
Content-Type: multipart/alternative; boundary="e89a8f839ca1f5860704d2978658"
Cc: Mark Nottingham <mnot@mnot.net>, 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: Sun, 06 Jan 2013 04:55:56 -0000

On Jan 5, 2013 8:20 PM, "Robert Sayre" <sayrer@gmail.com> wrote:
>
> On Sat, Jan 5, 2013 at 6:59 PM, Mark Nottingham <mnot@mnot.net> wrote:
> >
> > Yes, you've brought that to our attention several times. If you wanted
> > this spec to align with your software, it would have been much easier
> > if you'd got involved before Last Call.
>
> Well, there shouldn't be any big adjustments to my software at all,
> and the document generally looks good. This is just a bug: two parties
> can apply the same patch and get different results, without
> encountering an error.
>

Not seeing the bug... applying the same patch to different resources that
have different states ought to have different results. #worksasintended
#wontfix #moveonthereisnothingmoretoseehere

- james

> >>> However, I'm even more interested in getting this format published,
> >>
> >> Well, I guess someone has something they want to ship...
> >
> > Right. I'll let that statement stand on its own; I think anyone who's
been
> > participating or watching the WG can assess how justified it is.
>
> Ah. I meant that the WG seems to be favoring "running code" a little
> too heavily in the presence of a bug. It's an old argument, and it's
> boring: "We can't change it now, there are already twelve users!"
>
> >
> > Always a pleasure, Rob.
>
> That tone leaves something to be desired, but no matter. This is a bug
> and the WG should fix it. I don't think more process emails are
> necessary.
>
> - Rob
>
> On Sat, Jan 5, 2013 at 6:59 PM, Mark Nottingham <mnot@mnot.net> wrote:
> > On 06/01/2013, at 1:29 PM, Robert Sayre <sayrer@gmail.com> wrote:
> >
> >> On Sat, Jan 5, 2013 at 5:48 PM, Mark Nottingham <mnot@mnot.net> wrote:
> >>>
> >>> However, at this point, doing so really a judgement call; we have
multiple implementations, and we shouldn't
> >>> force them to change arbitrarily.
> >>
> >> The word "arbitrarily" seems inappropriate here. I raised at least
> >> four technical issues and your message addresses none of them.
> >
> > ... and I explained why.
> >
> >
> >>> As far as I can see, you haven't convinced anyone that this is a
serious enough problem to do so (and I don't
> >>> appear to be the only one to hold that opinion, by any means).
> >>
> >> Did you read this thread? Markus Lanthaler and Conal Tuohy raised
> >> similar points.
> >
> > Yes.
> >
> >
> >>> Furthermore, it's not clear that the use cases you have in mind
(since you have brought up JSON Sync)
> >>> are in-scope for these specifications.
> >>
> >> That assertion is both unsubstantiated and incorrect. json-sync has
> >> identical primitive operations to JSON Patch (create/edit/remove vs
> >> add/replace/remove). The JSON Patch document defines Copy and Move in
> >> terms of the add/replace, so those are mostly syntactic sugar. The
> >> only meaningful delta is the "test" operation, and I do plan to add
> >> that to json-sync, since it's a good way to make application-specific
> >> assertions.
> >
> > Yes, you've brought that to our attention several times. If you wanted
this spec to align with your software, it would have been much easier if
you'd got involved before Last Call.
> >
> >
> >>> However, I'm even more interested in getting this format published,
> >>
> >> Well, I guess someone has something they want to ship...
> >
> > Right. I'll let that statement stand on its own; I think anyone who's
been participating or watching the WG can assess how justified it is.
> >
> > Always a pleasure, Rob.
> >
> >
> >>
> >> - Rob
> >>
> >>> Cheers,
> >>>
> >>>
> >>> On 06/01/2013, at 11:19 AM, Robert Sayre <sayrer@gmail.com> wrote:
> >>>
> >>>> Mark,
> >>>>
> >>>> The WG's reasoning, as stated in your message below, seems flawed.
> >>>> Messages since your last communication on this matter have shown:
> >>>>
> >>>> 1) The ambiguity around arrays makes the patch format unsuitable for
> >>>> common concurrent editing algorithms.
> >>>> 2) The ambiguity is likely to occur in the real world, for a couple
of
> >>>> different reasons.
> >>>> 3) It's not possible to tell whether a JSON Pointer document is
> >>>> syntactically correct in isolation.
> >>>>
> >>>> Additionally, you raised this point in your message below:
> >>>>>
> >>>>> the patch author already has to understand the semantics of the
document they're patching
> >>>>
> >>>> That claim does not seem to be well-justified, and it could be
> >>>> meaningless to the person implementing patch software (for example:
> >>>> https://github.com/sayrer/json-sync).
> >>>>
> >>>> This issue is a problem in practice, and it's a problem in theory as
> >>>> well. JSON-Patch messages aren't sufficiently self-descriptive, so
> >>>> they aren't appropriate for use in a RESTful system.
> >>>>
> >>>> A response containing technical reasoning seems in order, since the
> >>>> points raised by myself and others on this issue are unrelated to the
> >>>> WG's previous thinking.
> >>>>
> >>>> - Rob
> >>>>
> >>>> On Sun, Dec 16, 2012 at 9:41 PM, Mark Nottingham <mnot@mnot.net>
wrote:
> >>>>> Robert,
> >>>>>
> >>>>> This was discussed extensively in the Working Group.
> >>>>>
> >>>>> The root of the issue was that some people reflexively felt that
this was necessary, but upon reflection, we decided it wasn't; although it
seems "natural" to some, especially those coming from a static language
background, it didn't provide any utility.
> >>>>>
> >>>>> You might argue that someone who (for example) adds to "/foo/1" in
the mistaken belief that it's an array, when in fact it's an object, will
get surprising results. That's true, but if we were to solve this problem,
that person would still need to understand the underlying semantics of
"foo" to do anything useful to it -- and I'm not hearing anyone complain
about that (I hope).
> >>>>>
> >>>>> Put another way -- do you really think that people PATCHing
something as if it's an array (when in fact it's an object) is a
significant, real-world problem, given that the patch author already has to
understand the semantics of the document they're patching? I don't, and the
WG didn't either.
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>>
> >>>>> On 17/12/2012, at 3:36 PM, Robert Sayre <sayrer@gmail.com> wrote:
> >>>>>
> >>>>>> The cost of fixing it seems low, either by changing the path
syntax of
> >>>>>> JSON pointer or changing the names of operations applied to arrays.
> >>>>>> Array-like objects are common enough in JavaScript to make this a
> >>>>>> worry. The other suggestions either assume a particular policy for
> >>>>>> concurrent edits or require more machinery (test operation etc).
> >>>>>> Wouldn't it be simpler to make the patch format more precise?
> >>>>>>
> >>>>>> - Rob
> >>>>>>
> >>>>>> On Sun, Dec 16, 2012 at 4:33 PM, Matthew Morley <matt@mpcm.com>
wrote:
> >>>>>>> I am usually lurking and struggling to keep up with these posts.
But, I
> >>>>>>> concur with James, this really is a non-issue in practice.
> >>>>>>>
> >>>>>>> The JSON Pointer expresses a path down a JSON object to a
specific context.
> >>>>>>> The Patch expresses a change within or to that context.
> >>>>>>> Everything about the both standards is about that end context.
> >>>>>>>
> >>>>>>> If you want to confirm the type of the context before applying a
patch, this
> >>>>>>> should probably be part of a test operation. I'm not sure if this
is
> >>>>>>> possible at this point (?), but that is where the logic should
exist.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Sun, Dec 16, 2012 at 12:22 AM, James M Snell <jasnell@gmail.com>
wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Sat, Dec 15, 2012 at 8:36 PM, Robert Sayre <sayrer@gmail.com>
wrote:
> >>>>>>>>>
> >>>>>>>>> On Fri, Dec 14, 2012 at 9:17 AM, Markus Lanthaler
> >>>>>>>>> <markus.lanthaler@gmx.net> wrote:
> >>>>>>>>>>
> >>>>>>>>>> Hmm.. I think that’s quite problematic. Especially considering
how JSON
> >>>>>>>>>> Pointer is used in JSON Patch.
> >>>>>>>>>
> >>>>>>>>> I agree--I provided the same feedback privately. It seems
> >>>>>>>>> straightforwardly unsound.
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> In practice it doesn't seem to be much of an issue.
> >>>>>>>>
> >>>>>>>> Specifically, if I GET an existing document and get an etag with
the JSON,
> >>>>>>>> then make some changes and send a PATCH with If-Match, the fact
that any
> >>>>>>>> given pointer could point to an array or object member doesn't
really matter
> >>>>>>>> much.
> >>>>>>>>
> >>>>>>>> For example:
> >>>>>>>>
> >>>>>>>>> GET /the/doc HTTP/1.1
> >>>>>>>>
> >>>>>>>> <  HTTP/1.1 200 OK
> >>>>>>>>   ETag: "my-document-tag"
> >>>>>>>>   Content-Type: application/json
> >>>>>>>>
> >>>>>>>>   {"1":"foo"}
> >>>>>>>>
> >>>>>>>>> PATCH /the/doc HTTP/1.1
> >>>>>>>>   If-Match: "my-document-etag"
> >>>>>>>>   Content-Type: application/json-patch
> >>>>>>>>
> >>>>>>>>   [{"op":"add","path":"/2","value":"bar"}]
> >>>>>>>>
> >>>>>>>> Generally speaking, someone should not be using PATCH to perform
a partial
> >>>>>>>> modification if they don't already have some knowledge in
advance what they
> >>>>>>>> are modifying. The only time the apparent ambiguity becomes an
issue is when
> >>>>>>>> a client is blindly sending a patch to an unknown endpoint... in
which case,
> >>>>>>>> you get whatever you end up with.
> >>>>>>>>
> >>>>>>>> - James
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>> - Rob
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>>
> >>>>>>>>>> Markus Lanthaler
> >>>>>>>>>>
> >>>>>>>>>> @markuslanthaler
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> From: James M Snell [mailto:jasnell@gmail.com]
> >>>>>>>>>> Sent: Friday, December 14, 2012 5:41 PM
> >>>>>>>>>> To: Markus Lanthaler
> >>>>>>>>>> Cc: IETF Discussion; IETF Apps Discuss
> >>>>>>>>>> Subject: Re: [apps-discuss] Last Call:
> >>>>>>>>>> <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to
Proposed Standard
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> JSON Pointer does not distinguish between objects and arrays.
That is
> >>>>>>>>>> not determined until the pointer is applied to an actual
object instance...
> >>>>>>>>>> the pointer "/1" is valid against {"1":"a"} or ["a","b"]
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On Fri, Dec 14, 2012 at 2:51 AM, Markus Lanthaler
> >>>>>>>>>> <markus.lanthaler@gmx.net> wrote:
> >>>>>>>>>>
> >>>>>>>>>> I've asked that before but didn't get an answer. So let me ask
again
> >>>>>>>>>> (even
> >>>>>>>>>> though I'm quite sure it has already been asked by somebody
else).
> >>>>>>>>>>
> >>>>>>>>>> How does JSON Pointer distinguish between objects and arrays?
E.g.
> >>>>>>>>>> consider
> >>>>>>>>>> the following JSON document:
> >>>>>>>>>>
> >>>>>>>>>> {
> >>>>>>>>>> "foo": "bar",
> >>>>>>>>>> "1": "baz"
> >>>>>>>>>> }
> >>>>>>>>>>
> >>>>>>>>>> As I read the draft, the JSON Pointer "/1" would evaluate to
"baz" even
> >>>>>>>>>> though that's probably not what the author intended. Is there
a way to
> >>>>>>>>>> avoid
> >>>>>>>>>> that?
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Thanks,
> >>>>>>>>>> Markus
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> Markus Lanthaler
> >>>>>>>>>> @markuslanthaler
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>> -----Original Message-----
> >>>>>>>>>>> From: apps-discuss-bounces@ietf.org [mailto:apps-discuss-
> >>>>>>>>>>> bounces@ietf.org] On Behalf Of The IESG
> >>>>>>>>>>> Sent: Tuesday, December 11, 2012 4:01 PM
> >>>>>>>>>>> To: IETF-Announce
> >>>>>>>>>>> Cc: apps-discuss@ietf.org
> >>>>>>>>>>> Subject: [apps-discuss] Last Call:
<draft-ietf-appsawg-json-pointer-
> >>>>>>>>>>> 07.txt> (JSON Pointer) to Proposed Standard
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> The IESG has received a request from the Applications Area
Working
> >>>>>>>>>>> Group
> >>>>>>>>>>> WG (appsawg) to consider the following document:
> >>>>>>>>>>> - 'JSON Pointer'
> >>>>>>>>>>> <draft-ietf-appsawg-json-pointer-07.txt> as Proposed Standard
> >>>>>>>>>>>
> >>>>>>>>>>> The IESG plans to make a decision in the next few weeks, and
solicits
> >>>>>>>>>>> final comments on this action. Please send substantive
comments to
> >>>>>>>>>>> the
> >>>>>>>>>>> ietf@ietf.org mailing lists by 2012-12-25. Exceptionally,
comments
> >>>>>>>>>>> may
> >>>>>>>>>>> be
> >>>>>>>>>>> sent to iesg@ietf.org instead. In either case, please retain
the
> >>>>>>>>>>> beginning of the Subject line to allow automated sorting.
> >>>>>>>>>>>
> >>>>>>>>>>> Abstract
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> JSON Pointer defines a string syntax for identifying a
specific
> >>>>>>>>>>> value
> >>>>>>>>>>> within a JSON document.
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> The file can be obtained via
> >>>>>>>>>>>
http://datatracker.ietf.org/doc/draft-ietf-appsawg-json-pointer/
> >>>>>>>>>>>
> >>>>>>>>>>> IESG discussion can be tracked via
> >>>>>>>>>>>
> >>>>>>>>>>>
http://datatracker.ietf.org/doc/draft-ietf-appsawg-json-pointer/ballot/
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> No IPR declarations have been submitted directly on this I-D.
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> _______________________________________________
> >>>>>>>>>>> apps-discuss mailing list
> >>>>>>>>>>> apps-discuss@ietf.org
> >>>>>>>>>>> https://www.ietf.org/mailman/listinfo/apps-discuss
> >>>>>>>>>>
> >>>>>>>>>> _______________________________________________
> >>>>>>>>>> apps-discuss mailing list
> >>>>>>>>>> apps-discuss@ietf.org
> >>>>>>>>>> https://www.ietf.org/mailman/listinfo/apps-discuss
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> _______________________________________________
> >>>>>>>>>> apps-discuss mailing list
> >>>>>>>>>> apps-discuss@ietf.org
> >>>>>>>>>> https://www.ietf.org/mailman/listinfo/apps-discuss
> >>>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> _______________________________________________
> >>>>>>>> apps-discuss mailing list
> >>>>>>>> apps-discuss@ietf.org
> >>>>>>>> https://www.ietf.org/mailman/listinfo/apps-discuss
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Matthew P. C. Morley
> >>>>>> _______________________________________________
> >>>>>> apps-discuss mailing list
> >>>>>> apps-discuss@ietf.org
> >>>>>> https://www.ietf.org/mailman/listinfo/apps-discuss
> >>>>>
> >>>>> --
> >>>>> Mark Nottingham   http://www.mnot.net/
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>> --
> >>> Mark Nottingham   http://www.mnot.net/
> >>>
> >>>
> >>>
> >
> > --
> > Mark Nottingham   http://www.mnot.net/
> >
> >
> >
> _______________________________________________
> apps-discuss mailing list
> apps-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/apps-discuss