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

Julian Reschke <julian.reschke@gmx.de> Tue, 22 November 2011 09:13 UTC

Return-Path: <julian.reschke@gmx.de>
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 6266421F8CA7 for <apps-discuss@ietfa.amsl.com>; Tue, 22 Nov 2011 01:13:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.177
X-Spam-Level:
X-Spam-Status: No, score=-104.177 tagged_above=-999 required=5 tests=[AWL=-1.878, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, 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 033QMZF25Pid for <apps-discuss@ietfa.amsl.com>; Tue, 22 Nov 2011 01:13:21 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 762F421F8CA6 for <apps-discuss@ietf.org>; Tue, 22 Nov 2011 01:13:21 -0800 (PST)
Received: (qmail invoked by alias); 22 Nov 2011 09:13:19 -0000
Received: from p5DCC9581.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.149.129] by mail.gmx.net (mp058) with SMTP; 22 Nov 2011 10:13:19 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19rmcFomvpr3YgyW3jJ4zNSIss0mC6sed33sel8e9 It24XwhaUFjrnI
Message-ID: <4ECB67A8.5080005@gmx.de>
Date: Tue, 22 Nov 2011 10:13:12 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
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> <4ECB66B0.6060102@it.aoyama.ac.jp>
In-Reply-To: <4ECB66B0.6060102@it.aoyama.ac.jp>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Mark Nottingham <mnot@mnot.net>, 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: Tue, 22 Nov 2011 09:13:22 -0000

On 2011-11-22 10:09, "Martin J. Dürst" wrote:
> On 2011/11/22 8:43, Mark Nottingham wrote:
>> 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,
>
> Up to here, this makes a ton of sense.
>
>> but that when they need to be in ASCII environments (like URIs) they
>> get UTF-8'ed and then percent-escaped.
>
> This would mean that e.g. in a Java program that for some reason is kept
> in US-ASCII, I'd have to use %-encoding. This doesn't make sense to me
> at all.
>
> So I'd say that json pointers are escaped according to the conventions
> of the substrate that carries them when needed (e.g. pure ASCII, or
> other kinds of encodings that can't handle the whole Unicode range).
>
> Then for json pointers as fragment identifiers, I'd mention that where
> necessary (e.g. for URIs), the convention for converting from IRIs to
> URIs (see RFC 3987) applies.

+1 up to here.

> By the way, I don't see a need to escape "/" at all in a fragment
> identifier. "/" is plain and simply allowed in fragment identifiers.
> Please see http://tools.ietf.org/html/rfc3986#section-3.5. Of course,
> it's not forbidden to escape "/", so software that is interpreting a
> fragment identifier has to make sure it does the right thing.
>
> Regards, Martin.
> ...

The escaping of "/" refers to the fact that "/" is used as delimiter in 
the pointer syntax (so if you have "/" in a token you need to escape it).

Speaking of fragment identifiers -- sounds like somebody is working on a 
fragment identifier syntax for the JSON media type???

Best regards, Julian