Re: [apps-discuss] Last Call: <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to Proposed Standard
James M Snell <jasnell@gmail.com> Tue, 18 December 2012 05:25 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 1339321F8573; Mon, 17 Dec 2012 21:25:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.677
X-Spam-Level:
X-Spam-Status: No, score=-3.677 tagged_above=-999 required=5 tests=[AWL=-0.079, 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 4su-CWVsEASZ; Mon, 17 Dec 2012 21:25:10 -0800 (PST)
Received: from mail-ia0-f181.google.com (mail-ia0-f181.google.com [209.85.210.181]) by ietfa.amsl.com (Postfix) with ESMTP id 3094121F8563; Mon, 17 Dec 2012 21:25:09 -0800 (PST)
Received: by mail-ia0-f181.google.com with SMTP id s32so186365iak.12 for <multiple recipients>; Mon, 17 Dec 2012 21:25:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KuWfD+hl74ZdxJEk5LpuYCQ7BwOSl2EI+wuDq5WKqaI=; b=QeaiDSd+pNo65tao6tByZ5QEMDm5QIq5aRYQyF43d8nolclR106ysCzi3lFsLjNXG3 sHIOtNihujKltZMZ+57hXP+7mY3x48G7a2HHp9gPPBjEriEoNcsOINEkr019jR1m2/gp I1G1E+2QmCjn3J52cDkZ4hXcR9xlGws4rKDtxQ1NRYUd8vig30Uvl9I8w0fqRBwVRsBF YYcV813S6+O0xHBEJDrNyx7PI3P/un8sqdB9gB6Ow2a41XiifcnxE7tC+oFJhXg4DluZ oAjOtwaz+IJ+DkHud+VehePrBbOjGvgPfG1/oM0YIqGl3gDaFGls8MExrU3Hq0fcoeH0 Cpdw==
Received: by 10.50.178.106 with SMTP id cx10mr1306380igc.24.1355808308974; Mon, 17 Dec 2012 21:25:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.7.19 with HTTP; Mon, 17 Dec 2012 21:24:48 -0800 (PST)
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E1150408948F@WSMSG3153V.srv.dir.telstra.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> <CAChr6Sy-Xc8vC6FabFmdseR7xfQ-6t9hARunWjYgt6FqjmoBWg@mail.gmail.com> <CABP7Rbd7w-7-8+q0T7WciBp6NU7c2uJjmRGiLFjxkc52P5KLdw@mail.gmail.com> <CAChr6SyV-kDLYnDXXjW5GD7KZ1brBYLmvO-5TkODGtcHOf2rmg@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E1150408948F@WSMSG3153V.srv.dir.telstra.com>
From: James M Snell <jasnell@gmail.com>
Date: Mon, 17 Dec 2012 21:24:48 -0800
Message-ID: <CABP7Rbc10-B1Fgu5w5LSATWW2vCxdcpERKTi6cbUXgF03ks7Cw@mail.gmail.com>
Subject: Re: [apps-discuss] Last Call: <draft-ietf-appsawg-json-pointer-07.txt> (JSON Pointer) to Proposed Standard
To: "Manger, James H" <James.H.Manger@team.telstra.com>
Content-Type: multipart/alternative; boundary="e89a8f5036c8a3d5f404d119b87a"
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: Tue, 18 Dec 2012 05:25:11 -0000
What I'm not clear on, however, is what significant benefit making this kind of change would provide. Yes, the syntax can be more verbose and exact but it's not clear that the change is worth the cost. Robert mentioned that the addition of the json-predicates test doubled the size of the json-patch file, and yes, I get that.. but if we're talking about sending a two-object json-patch document to modify a JSON document many times larger than that, it's still worth the extra handful of bytes it takes. Sure, if we had a complex patch document consisting of large amounts of json-patch and json-predicate objects being applied to an arbitrarily structured document, I could understand the concern, but in that case one would have to question the wisdom of doing a partial update in the first place. JSON-Patch documents are best served small and simple, and the inclusion of a json-predicate or two per instance is not going to blow the budget on bits on the wire. So the key question becomes: what added benefit does a more verbose pointer syntax provide us? And is there a concrete need for that benefit that can be demonstrated? - James On Mon, Dec 17, 2012 at 9:12 PM, Manger, James H < James.H.Manger@team.telstra.com> wrote: > If we were starting from scratch and defining JSON Pointer again I would > argue for distinguishing array indices and object names in the syntax. For > instance, prefix an object name with "/" and an array index with ":". > > json-pointer = *segment > segment = "/" name / ":" index > name = *( unescaped / escaped ) > unescaped = %x00-2E / %x30-39 / %x3B-7D / %x7F-10FFFF > escaped = "~" ( "0" / "1" / "2" ) > index = "0" / %x31-39 *(%x30-39) / "-" > > 1. It makes parsing marginally harder: you cannot just split on "/" and > unescape each segment. > 2. It doesn't make much difference for selecting a value from some JSON, > or for finding a spot to insert a new value. > 3. It would allow you to automatically create object *or array* ancestors > when setting a new value (eg adding 23 at /a:0/b:0 to {} could give > {"a":[{"b":[23]}]}). > 4. It might encourage better validation of pointers, but that is probably > wishful thinking. > > But JSON Pointer drafts have used the /{name|index} format for a year. > There are a bunch of implementations. The difference is minor in most > circumstances. So while I would be happy to change, I am also comfortable > staying with the current pointer syntax. > > > > There's no good reason for it to be that way, is there? > > I don't think so. > > -- > James Manger >
- RE: [apps-discuss] Last Call: <draft-ietf-appsawg… Markus Lanthaler
- RE: [apps-discuss] Last Call: <draft-ietf-appsawg… Markus Lanthaler
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- RE: [apps-discuss] Last Call: <draft-ietf-appsawg… Markus Lanthaler
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Mark Nottingham
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Matthew Morley
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- RE: [apps-discuss] Last Call: <draft-ietf-appsawg… Manger, James H
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Matthew Morley
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Mark Nottingham
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Mark Nottingham
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Abdussalam Baryun
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Abdussalam Baryun
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Matthew Morley
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Paul C. Bryan
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Murray S. Kucherawy
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Carsten Bormann
- RE: [apps-discuss] Last Call: <draft-ietf-appsawg… Markus Lanthaler
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Conal Tuohy
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Paul C. Bryan
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Matthew Morley
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Jared Rosoff
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Jared Rosoff
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Jared Rosoff
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… James M Snell
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Hector Santos
- Re: [apps-discuss] Last Call: <draft-ietf-appsawg… Robert Sayre