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

From: Mark Nottingham <[email-masked]>
Date: Mon, 2 Jul 2012 10:01:26 +1000

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/

---

From: "Paul C. Bryan" <[email-masked]>
Date: Tue, 03 Jul 2012 09:49:51 -0700

Looks good to me.

Paul