[apps-discuss] draft-ietf-appsawg-json-pointer-00 feedback

Julian Reschke <julian.reschke@gmx.de> Wed, 04 January 2012 12:49 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 1B28921F863C for <apps-discuss@ietfa.amsl.com>; Wed, 4 Jan 2012 04:49:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.856
X-Spam-Level:
X-Spam-Status: No, score=-103.856 tagged_above=-999 required=5 tests=[AWL=-1.257, 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 76reyUJPh+7M for <apps-discuss@ietfa.amsl.com>; Wed, 4 Jan 2012 04:49:54 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 2611B21F8624 for <apps-discuss@ietf.org>; Wed, 4 Jan 2012 04:49:53 -0800 (PST)
Received: (qmail invoked by alias); 04 Jan 2012 12:49:52 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp030) with SMTP; 04 Jan 2012 13:49:52 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19FT5YUj2NFQ8Hssx8mWlSn4W5v6G61/AXUeH8DUV vH+sS8m8EB0VdU
Message-ID: <4F044AEE.2080205@gmx.de>
Date: Wed, 04 Jan 2012 13:49:50 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: apps-discuss@ietf.org
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Subject: [apps-discuss] draft-ietf-appsawg-json-pointer-00 feedback
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, 04 Jan 2012 12:49:55 -0000

Hi Paul,

below some feedback:

Section 3:

>    ABNF syntax:
>
>    json-pointer = *( "/" reference-token )
>    reference-token = *( unescaped / escaped )
>    unescaped = %x00-2E / %x30-5B / %x5D-10FFFF

Is 0 really allowed? (I see JSON allows this as well; maybe that's 
something that needs to be discussed in the security considerations).

>    escaped = "\" ( "/" / "\" )
>
>    It is an error condition if a JSON Pointer value does not conform to
>    this syntax.

I'm fine with this because it allows using \ to escape more values in 
the future.

Section 4:

>       If the currently referenced value is a JSON array, the reference
>       token MUST contain an unsigned base-10 integer value, and the new
>       referenced value is the array element with the zero-based index
>       identified by the token.

Do we want to say something about leading zeroes in index values? I 
assume they are allowed?

Section 5:

>    A JSON Pointer MAY be represented in a JSON string value.  Per
>    [RFC4627], section 2.5, all instances of quotation mark '"' (%x22),
>    reverse solidus '\' (%x5C) and control (%x00-1F) characters MUST be
>    escaped.

The MAY is a statement of fact, not a normative requirement. Just say "can".

Section 6:

>    A JSON Pointer MAY be represented in a URI fragment identifier.  The
>    JSON pointer MUST be UTF-8 [RFC3629] encoded as octets; octets in the
>    URI "unreserved" set SHOULD be percent-encoded, per [RFC3986],
>    section 2.5.

See above.

Appendix A:

The semantics of fragment identifiers depends on the media type. You 
need to be clear whether you're trying to define the fragid semantics 
for application/json (which as far as I recall doesn't define any), or 
something else.

That being said:

>    http://example.com/example.json#
>       Resolves to the object value at the root of the JSON text
>       document.

The same would be true for

   http://example.com/example.json#/

right? I think we should stay away from empty fragment identifiers if we 
can. (There MAY be dragons here).

Best regards, Julian