Re: [apps-discuss] draft-pbryan-zyp-json-pointer: name syntax for non-ASCII

Mark Nottingham <mnot@mnot.net> Mon, 21 November 2011 23:43 UTC

Return-Path: <mnot@mnot.net>
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 EBFBC1F0C4C for <apps-discuss@ietfa.amsl.com>; Mon, 21 Nov 2011 15:43:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.334
X-Spam-Level:
X-Spam-Status: No, score=-105.334 tagged_above=-999 required=5 tests=[AWL=-2.735, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
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 sQIv1szxej6h for <apps-discuss@ietfa.amsl.com>; Mon, 21 Nov 2011 15:43:41 -0800 (PST)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) by ietfa.amsl.com (Postfix) with ESMTP id 6ABAC1F0C34 for <apps-discuss@ietf.org>; Mon, 21 Nov 2011 15:43:41 -0800 (PST)
Received: from mnot-mini.mnot.net (unknown [118.209.190.198]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 9814050A64; Mon, 21 Nov 2011 18:43:34 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <1321912269.1990.32.camel@neutron>
Date: Tue, 22 Nov 2011 10:43:30 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <E880E90A-332F-4D2F-9B20-7B7ADD03FE27@mnot.net>
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>
To: Paul C. Bryan <paul.bryan@forgerock.com>
X-Mailer: Apple Mail (2.1251.1)
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] draft-pbryan-zyp-json-pointer: name syntax for non-ASCII
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: Mon, 21 Nov 2011 23:43:46 -0000

The usual approach to this sort of thing is to define the "canonical" way to do it; i.e., json pointers *are* unicode strings; then you can define encodings into various environments (like URIs).

In this case, it'd probably be good enough to say that json pointers are unicode strings, but that when they need to be in ASCII environments (like URIs) they get UTF-8'ed and then percent-escaped.

Cheers,


On 22/11/2011, at 8:51 AM, Paul C. Bryan wrote:

> Okay, so I'll write-up separate sections for JSON string values and URI fragment identifiers. Any objections?
> 
> Paul
> 
> On Tue, 2011-11-22 at 07:55 +1100, Mark Nottingham wrote:
>> +1 to Julian here -- there's no reason why non-ASCII chars need to be percent-encoded when they occur inside a JSON document, only when they're in a URI (or similar context).
>> 
>> Cheers,
>> 
>> 
>> On 22/11/2011, at 7:12 AM, Julian Reschke wrote:
>> 
>> > On 2011-11-21 21:09, Paul C. Bryan wrote:
>> >> The intent is to allow a JSON Pointer to be expressed as a JSON string
>> >> value as well as a URI fragment identifier. The latter is the most
>> >> significant driver for URI percent-encoding.
>> >> ...
>> > 
>> > Well, you could use it as fragment identifier (or otherwise URI component) by UTF-8-percent-escaping.
>> > 
>> > The question is whether that use case requires them to be all ASCII every else, such as in a JSON patch document.
>> > 
>> > Best regards, Julian
>> > _______________________________________________
>> > apps-discuss mailing list
>> > 
>> apps-discuss@ietf.org
>> 
>> > 
>> https://www.ietf.org/mailman/listinfo/apps-discuss
>> 
>> 
>> --
>> Mark Nottingham   
>> http://www.mnot.net/
>> 
>> 
>> 
>> 
>> 
> 
> _______________________________________________
> apps-discuss mailing list
> apps-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/apps-discuss

--
Mark Nottingham   http://www.mnot.net/