Re: [apps-discuss] Confusing JSON Pointer

Julian Reschke <julian.reschke@gmx.de> Tue, 27 March 2012 14:23 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 A80A721F88EB for <apps-discuss@ietfa.amsl.com>; Tue, 27 Mar 2012 07:23:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.755
X-Spam-Level:
X-Spam-Status: No, score=-102.755 tagged_above=-999 required=5 tests=[AWL=-2.906, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, MIME_CHARSET_FARAWAY=2.45, 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 l7UkKK0X4IVC for <apps-discuss@ietfa.amsl.com>; Tue, 27 Mar 2012 07:23:07 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 8E26C21F889B for <apps-discuss@ietf.org>; Tue, 27 Mar 2012 07:23:06 -0700 (PDT)
Received: (qmail invoked by alias); 27 Mar 2012 14:23:05 -0000
Received: from mail.greenbytes.de (EHLO [IPv6:::1]) [217.91.35.233] by mail.gmx.net (mp038) with SMTP; 27 Mar 2012 16:23:05 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/g5WR3fOjgIcOhSNquVwWzYN5oeoUT8RzXhttgQD OQOnIBRJgqHGac
Message-ID: <4F71CD46.5070603@gmx.de>
Date: Tue, 27 Mar 2012 16:23:02 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0
MIME-Version: 1.0
To: 지송원 James Songwon Chi <chi880466@gmail.com>
References: <CAJO=ius8siusDXemCFQKy9=HOXs6L9eX108u7-OW3Rvu+L9qDw@mail.gmail.com> <4F7172FE.6060207@gmx.de> <CAJO=iuv2b1J8D=k5mTEYU3f564cYnXuiL=-83qKFm-kGAjSZOw@mail.gmail.com>
In-Reply-To: <CAJO=iuv2b1J8D=k5mTEYU3f564cYnXuiL=-83qKFm-kGAjSZOw@mail.gmail.com>
Content-Type: text/plain; charset="EUC-KR"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] Confusing JSON Pointer
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, 27 Mar 2012 14:23:08 -0000

On 2012-03-27 15:49, 지송원 James Songwon Chi wrote:
> 2012년 3월 27일 오후 4:57, Julian Reschke<julian.reschke@gmx.de>님의 말:
>> On 2012-03-27 07:22, 지송원 James Songwon Chi wrote:
>>>
>>> After reading JSON Pointer (draft-ietf-appsawg-json-pointer-01), I am
>>> confused with encoding or escape scheme.
>>> For me, it is an ambiguous scheme. For example, a reference token
>>> "ref/1" can be expressed following ways:
>>>
>>> 1) If it is a URI fragment identifier and a JSON Pointer
>>>       Step 1. apply URI encoding: ref%5C1
>>>       Step 2. apply JSON Pointer encoding:  ref%5C1
>>>       Final result: ref%5C1
>>>
>>> 2) If it is a JSON Pointer and a URI fragment identifier
>>>       Step 1. apply JSON Pointer encoding: ref^/1
>>>       Step 2. apply URI encoding:  ref^%5C1
>>>       Final result: ref^%5C1
>>>
>>> I expected the same results.
>>>
>>> And if my interpretation is wrong, to prevent the similar question,
>>> there should be some examples for this kind.
>>> ...
>>
>>
>> I don't understand the question.
>>
>> The spec states how to put JSON Pointers (^-escaping) into fragment
>> identifiers (%-escaping).
>>
>> As far as I can tell the outcome then is what you have under 2), no?
>>
>> Best regards, Julian
> 
> Thank you Julian for the reply.
> Yes. Answer is 2) for above question. Well, but I gave a wrong
> question and a wrong example (And solidus is 0x2F, not 0x5C.)
> 
> This is corrected one:
> 
> If I want a JSON Pointer to be represented as both a JSON String and a
> URI fragment identifier, I should apply three encoding scheme.
> There are two sequences with example:
> ...

You convert *either* to a string *or* to a URI fragment. Never both.

> ...

Best regards, Julian