Subject: [apps-discuss] draft-pbryan-zyp-json-pointer progress

From: Julian Reschke <[email-masked]>
Date: Thu, 29 Dec 2011 15:04:47 +0100

Paul,

just checking: do we have a plan for the I18N issues?

Also, while discussing this on the Jackrabbit mailing list, one 
potential issue was brought up:

If we do not special-case array addressing, a given pointer, such as

  /foo/bar/1

can identify two different things, either foo.bar[1] or foo.bar.["1"].

Of course this is only a problem when looking at a pointer in isolation 
(without knowing the object to apply it to), but I think it's worth 
thinking about.

Best regards, Julian

PS: and yes, the downside of using brackets would be that we need to 
escape more characters.

---

From: "Paul C. Bryan" <[email-masked]>
Date: Thu, 29 Dec 2011 21:11:48 -0800

> just checking: do we have a plan for the I18N issues?

I believe the consensus is that a pointer should be Unicode;
ramifications:

1. If it's a JSON string value, then JSON encoding applies.
2. If it's a URI fragment identifier, then URI percent-encoding applies.

The outstanding issue to address is cases where a member name contains
reference token prefix "/" character(s). In light of this, using some
sort of escape character makes the most sense; which character to use is
the question. U+FFFD was mentioned. Any further thoughts?  

> can identify two different things, either foo.bar[1] or foo.bar.["1"].

This topic has come up multiple times; it's true that .../1 is ambiguous
until you resolve a pointer against a concrete JSON value. What's not
been obvious to date is how identifying the type of value in the pointer
is of use. I could imagine cases where you would want to create missing
intermediate values while traversing a pointer, at which point .../1 is
problematic as it would imply the creation of a sparse array. If there
is a strong drive to identify types in pointers, I'm definitely
interested in understanding the case further.

> PS: and yes, the downside of using brackets would be that we need to 

Yes, ouch.

Paul

P.S. I'm planning on publishing new (APPSAWG) drafts for JSON Patch and
JSON Pointer in the next few days, in time for review in the new
year. :-)

---

From: Julian Reschke <[email-masked]>
Date: Fri, 30 Dec 2011 09:26:21 +0100

On 2011-12-30 06:11, Paul C. Bryan wrote:
> I believe the consensus is that a pointer should be Unicode; ramifications:
>

+1

> the question. U+FFFD was mentioned. Any further thoughts?

Using a fixed replacement works for me. The alternative that was 
mentioned was a control character such as US (0x1f).

> interested in understanding the case further.

I agree with the analysis. Right now I can't provide a use case that 
would require removing the ambiguity, but I have the feeling that this 
will cause pain later on. Sorry for not having something more concrete...

> JSON Pointer in the next few days, in time for review in the new year. :-)

Thanks!

Best regards, Julian