Subject: Re: [apps-discuss] I-D Action: draft-ietf-appsawg-json-pointer-00.txt

From: "Manger, James H" <[email-masked]>
Date: Thu, 5 Jan 2012 00:34:02 +1100

> As far as I understand, this will lead to quadruple escaping. That's fine with me,

Quadruple escaping is fine!!

> If I got it wrong, please correct.

Why not pick an escaping mechanism where it isn't so hard to tell if an example is wrong.

> The above JSON Pointer, "ab\\cd/ef\/gh", has to be escaped again when written as a JSON string: "ab\\\\cd/ef\\\/gh".

This is half wrong. It is actually valid, but JSON-escaping only 1 of the 2 forward slashes is silly, hence confusing.

> the JSON Pointer "ab\\cd/ef\/gh" becomes "ab%5Ccd/ef%2Fgh" as a fragment identifier.

This is wrong. It badly mixes layers.

--
James Manger

---

From: "Martin J. Dürst" <[email-masked]>
Date: Thu, 05 Jan 2012 19:19:24 +0900

> Quadruple escaping is fine!!

Great!!!!

> Why not pick an escaping mechanism where it isn't so hard to tell if an example is wrong.

XPointer uses ^ somewhere, as far as I remember.

That would give us things such as "ab^^cd/ef^/gh", and the JSON string 
would simply be the same "ab^^cd/ef^/gh". And the URI fragment id would 
be "ab%5E%5Ecd/ef%5E/gh".

> This is half wrong. It is actually valid, but JSON-escaping only 1 of the 2 forward slashes is silly, hence confusing.

Ah, okay. So "ab\\\\cd/ef\\/gh" or "ab\\\\cd\/ef\\\/gh" would be 
consistent. And "ab\\\\cd\/ef\\/gh" would be another silly variant, yes?

> This is wrong. It badly mixes layers.

Yes indeed. After I sent my mail, I was thinking about this a bit more, 
and the more I thought about it, the less I liked it. The layers should be:

tokens -> pointer -> fragment

That means that the JSON Pointer "ab\\cd/ef\/gh" has to become
"ab%5C%5Ccd/ef%5C/gh" as a fragment identifier.

But the more I think about it, the more I like the idea to use a third 
character (not \ and not %) for escaping in the JSON Pointer syntax (as 
long as it won't be a character that's difficult to print or type).

Regards,    Martin.

---

From: "Paul C. Bryan" <[email-masked]>
Date: Thu, 05 Jan 2012 07:29:25 -0800

> > Quadruple escaping is fine!!

I'm now imagining an RFC coming this April entitled, Compact ASCII
Notation for Denoting Your Sarcasm (CANDYS), and the use of explanation
marks play a key role!!!!

> be "ab%5E%5Ecd/ef%5E/gh".

I'm not attached to a particular escape character; I'm resigned to the
fact it's just a necessary evil. At least there's precedent for using
carat in a parallel specification. 

> long as it won't be a character that's difficult to print or type).

I agree.

Paul