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

"Paul C. Bryan" <paul.bryan@forgerock.com> Fri, 30 December 2011 05:12 UTC

Return-Path: <paul.bryan@forgerock.com>
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 0BF1B21F845F for <apps-discuss@ietfa.amsl.com>; Thu, 29 Dec 2011 21:12:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.998
X-Spam-Level:
X-Spam-Status: No, score=-5.998 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_14=0.6, RCVD_IN_DNSWL_MED=-4]
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 SNOPn7m3U6Km for <apps-discuss@ietfa.amsl.com>; Thu, 29 Dec 2011 21:12:21 -0800 (PST)
Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) by ietfa.amsl.com (Postfix) with SMTP id A1BD421F845E for <apps-discuss@ietf.org>; Thu, 29 Dec 2011 21:12:20 -0800 (PST)
Received: from mail-gy0-f179.google.com ([209.85.160.179]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKTv1IGHY4alO+lImYH23yizBZJjFWxAFw@postini.com; Fri, 30 Dec 2011 05:12:20 UTC
Received: by ghbz2 with SMTP id z2so4093635ghb.24 for <apps-discuss@ietf.org>; Thu, 29 Dec 2011 21:11:51 -0800 (PST)
Received: by 10.236.129.164 with SMTP id h24mr49418272yhi.78.1325221911335; Thu, 29 Dec 2011 21:11:51 -0800 (PST)
Received: from [192.168.1.5] (S0106a021b762dbb3.vf.shawcable.net. [174.1.40.184]) by mx.google.com with ESMTPS id u9sm71672082anh.20.2011.12.29.21.11.49 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Dec 2011 21:11:50 -0800 (PST)
Message-ID: <1325221908.18477.13.camel@neutron>
From: "Paul C. Bryan" <paul.bryan@forgerock.com>
To: IETF Apps Discuss <apps-discuss@ietf.org>
Date: Thu, 29 Dec 2011 21:11:48 -0800
In-Reply-To: <4EFC737F.3050803@gmx.de>
References: <4ECA5C66.1040305@gmx.de> <1321903463.1990.16.camel@neutron> <4ECAA9FE.6080802@gmx.de> <1321905599.1990.23.camel@neutron> <4ECAAF39.8000702@gmx.de> <1321906189.1990.26.camel@neutron> <4ECAB0BC.0@gmx.de> <6462023D-F767-45DE-9AF0-011CC48374CF@mnot.net> <1321912269.1990.32.camel@neutron> <E880E90A-332F-4D2F-9B20-7B7ADD03FE27@mnot.net> <1321923360.1990.34.camel@neutron> <1321923443.1990.35.camel@neutron> <4EFC737F.3050803@gmx.de>
Content-Type: multipart/alternative; boundary="=-mx65IWuFnU2s4Fs3x8dy"
X-Mailer: Evolution 3.2.2-1
Mime-Version: 1.0
Subject: Re: [apps-discuss] draft-pbryan-zyp-json-pointer progress
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: Fri, 30 Dec 2011 05:12:22 -0000

On Thu, 2011-12-29 at 15:04 +0100, Julian Reschke wrote:


> 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?  


> 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"].


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.


> 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.


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. :-)