Re: [apps-discuss] Confusing JSON Pointer
"Paul C. Bryan" <pbryan@anode.ca> Wed, 28 March 2012 01:36 UTC
Return-Path: <pbryan@anode.ca>
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 269D321F8600 for <apps-discuss@ietfa.amsl.com>; Tue, 27 Mar 2012 18:36:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 H+GVdEieWbvw for <apps-discuss@ietfa.amsl.com>; Tue, 27 Mar 2012 18:36:29 -0700 (PDT)
Received: from maple.anode.ca (maple.anode.ca [72.14.183.184]) by ietfa.amsl.com (Postfix) with ESMTP id 1632221F8602 for <apps-discuss@ietf.org>; Tue, 27 Mar 2012 18:36:29 -0700 (PDT)
Received: from [10.0.49.41] (unknown [204.14.239.221]) by maple.anode.ca (Postfix) with ESMTPSA id 7D06B6483 for <apps-discuss@ietf.org>; Wed, 28 Mar 2012 01:36:28 +0000 (UTC)
Message-ID: <1332898587.10875.5.camel@neutron>
From: "Paul C. Bryan" <pbryan@anode.ca>
To: apps-discuss@ietf.org
Date: Tue, 27 Mar 2012 18:36:27 -0700
In-Reply-To: <CAJO=iusKZo9DKynBL3vR11yL40t7X-DsndjXqQCRUUjMcxyE+w@mail.gmail.com>
References: <CAJO=ius8siusDXemCFQKy9=HOXs6L9eX108u7-OW3Rvu+L9qDw@mail.gmail.com> <4F7172FE.6060207@gmx.de> <CAJO=iuv2b1J8D=k5mTEYU3f564cYnXuiL=-83qKFm-kGAjSZOw@mail.gmail.com> <4F71CD46.5070603@gmx.de> <CAJO=iusKZo9DKynBL3vR11yL40t7X-DsndjXqQCRUUjMcxyE+w@mail.gmail.com>
Content-Type: multipart/alternative; boundary="=-NFRj3PzDHMV+6G+6XajQ"
X-Mailer: Evolution 3.2.2-1
Mime-Version: 1.0
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: Wed, 28 Mar 2012 01:36:31 -0000
On Wed, 2012-03-28 at 08:47 +0900, 지송원 James Songwon Chi wrote: > 2012년 3월 27일 오후 11:23, Julian Reschke <julian.reschke@gmx.de>님의 말: > > 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. > I don't agree with you. First, there is no such words. > Second, if it is used in a JSON Schema as a "$ref" value, it should be > both JSON String and URI. The intent of the draft is to establish rules for encoding in a JSON string or in a URI. Of course, I agree that a URI can in turn be expressed in a JSON string, but in this case, URI encoding applies; you do not mix-and-match encodings. > By the way, do we really *need another escape* even there are two > encodings already? I'm not sure what you mean here. If you encode as URI, presumably all valid URI characters are representable without any further escaping in a JSON string. Paul
- [apps-discuss] Confusing JSON Pointer 지송원 James Songwon Chi
- Re: [apps-discuss] Confusing JSON Pointer Julian Reschke
- Re: [apps-discuss] Confusing JSON Pointer 지송원 James Songwon Chi
- Re: [apps-discuss] Confusing JSON Pointer Julian Reschke
- Re: [apps-discuss] Confusing JSON Pointer 지송원 James Songwon Chi
- Re: [apps-discuss] Confusing JSON Pointer Paul C. Bryan
- Re: [apps-discuss] Confusing JSON Pointer 지송원 James Songwon Chi
- Re: [apps-discuss] Confusing JSON Pointer Paul C. Bryan
- Re: [apps-discuss] Confusing JSON Pointer 지송원 James Songwon Chi
- Re: [apps-discuss] Confusing JSON Pointer Julian Reschke
- Re: [apps-discuss] Confusing JSON Pointer Martin J. Dürst
- Re: [apps-discuss] Confusing JSON Pointer Paul C. Bryan