Re: [apps-discuss] #3: json-pointer escape characters

"Paul C. Bryan" <pbryan@anode.ca> Tue, 03 July 2012 16:49 UTC

Return-Path: <pbryan@anode.ca>
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 9349B11E8166 for <apps-discuss@ietfa.amsl.com>; Tue, 3 Jul 2012 09:49:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 nZL3+ymXXc0L for <apps-discuss@ietfa.amsl.com>; Tue, 3 Jul 2012 09:49:47 -0700 (PDT)
Received: from maple.anode.ca (maple.anode.ca [72.14.183.184]) by ietfa.amsl.com (Postfix) with ESMTP id 7CBEB11E8162 for <apps-discuss@ietf.org>; Tue, 3 Jul 2012 09:49:47 -0700 (PDT)
Received: from [10.126.22.47] (nat-204-14-239-210-sfo.net.salesforce.com [204.14.239.210]) by maple.anode.ca (Postfix) with ESMTPSA id C2990614C; Tue, 3 Jul 2012 16:49:54 +0000 (UTC)
From: "Paul C. Bryan" <pbryan@anode.ca>
To: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <E249E3B0-5979-485C-A227-02FC797AECA1@mnot.net>
References: <A01EC297-4D41-433F-B242-6023FB9DACB6@mnot.net> <CC100EB1.2F27D%jhildebr@cisco.com> <255B9BB34FB7D647A506DC292726F6E114F730F2BA@WSMSG3153V.srv.dir.telstra.com> <1340897879.2393.9.camel@pbryan-wsl.internal.salesforce.com> <A0874F7F-D4CB-45D9-8BF1-F00AED4668F0@mnot.net> <CABkgnnWFvZH9EM6m+e-6pqwGbY702r7keDgLwjQJ+s-rtwg9aw@mail.gmail.com> <1340922969.2393.13.camel@pbryan-wsl.internal.salesforce.com> <255B9BB34FB7D647A506DC292726F6E114F730FACE@WSMSG3153V.srv.dir.telstra.com> <1340984775.31848.2.camel@pbryan-wsl.internal.salesforce.com> <E249E3B0-5979-485C-A227-02FC797AECA1@mnot.net>
Content-Type: multipart/alternative; boundary="=-q/iwmrLW07GipczTkjGE"
Date: Tue, 03 Jul 2012 09:49:51 -0700
Message-ID: <1341334191.2442.0.camel@pbryan-wsl.internal.salesforce.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Cc: IETF Apps Discuss <apps-discuss@ietf.org>, Joe Hildebrand <jhildebr@cisco.com>
Subject: Re: [apps-discuss] #3: json-pointer escape characters
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: Tue, 03 Jul 2012 16:49:48 -0000

Looks good to me.

Paul

On Mon, 2012-07-02 at 10:01 +1000, Mark Nottingham wrote:

> I've started to go in this direction in <http://trac.tools.ietf.org/wg/appsawg/trac/changeset/85>; feedback appreciated.
> 
> I think we'll need a few examples to show that the ordering of decoding matters.
> 
> Also, anyone interesting in starting to collect test cases, as we've done for URI Templates <https://github.com/uri-templates/uritemplate-test>?
> 
> Cheers,
> 
> 
> On 30/06/2012, at 1:46 AM, Paul C. Bryan wrote:
> 
> > I'll concede that ~0 is easier for humans and regular expression parsers to process than ~~, so I'll retract any suggestion that it should be so.
> > 
> > On Fri, 2012-06-29 at 10:19 +1000, Manger, James H wrote:
> >> 
> >> >> As a quoting character, ~ is a good choice.  I might offer that 0 and
> >> >> 1 are strange choices for the next character, but I wont offer an
> >> >> alternative except to note that double-escape is the more commonly
> >> >> used method for escaping the escape character.
> >> 
> >> > True, ~~ would just as good to escape ~ instead of ~0...
> >> 
> >> No.
> >> 
> >> Using "~~" to escape "~" means a "~" in a pointer can be
> >> either an escaper or an escapee -- and you have to count
> >> a potentially indefinite number of preceding "~"'s to
> >> determine the answer. That just makes parsing and matching
> >> with a regex harder.
> >> 
> >> The names in the following 2 pointers end in "1" or "/".
> >> Which is which?
> >> 
> >>  /~~~~~~~~~~~~~~~~~~~~1
> >>  /~~~~~~~~~~~~~~~~~~~1
> >> 
> >> It is much more obvious if we use "~0" as the escape for "~".
> >> 
> >>  /~0~0~0~0~0~0~0~0~0~01
> >>  /~0~0~0~0~0~0~0~0~0~1
> >> 
> >> --
> >> James Manger
> >> 
> > 
> 
> --
> Mark Nottingham   http://www.mnot.net/
> 
> 
>