Re: [apps-discuss] Feedback on draft-ietf-appsawg-json-pointer-00

Mike Acar <macar@cloudmark.com> Fri, 02 March 2012 22:34 UTC

Return-Path: <macar@cloudmark.com>
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 E8ECE21E8049 for <apps-discuss@ietfa.amsl.com>; Fri, 2 Mar 2012 14:34:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 XxS+VaxYTKFO for <apps-discuss@ietfa.amsl.com>; Fri, 2 Mar 2012 14:34:34 -0800 (PST)
Received: from ht1-outbound.cloudmark.com (ht1-outbound.cloudmark.com [72.5.239.25]) by ietfa.amsl.com (Postfix) with ESMTP id 6DDBD21E8010 for <apps-discuss@ietf.org>; Fri, 2 Mar 2012 14:34:34 -0800 (PST)
Received: from [172.20.2.21] (172.20.2.21) by exch-htcas901.corp.cloudmark.com (172.22.10.73) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 2 Mar 2012 14:34:33 -0800
Message-ID: <4F514AF9.5010506@cloudmark.com>
Date: Fri, 02 Mar 2012 14:34:33 -0800
From: Mike Acar <macar@cloudmark.com>
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0
MIME-Version: 1.0
To: apps-discuss@ietf.org
References: <4F4FD8A5.6010603@cloudmark.com> <1330638350.2531.11.camel@neutron>
In-Reply-To: <1330638350.2531.11.camel@neutron>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Originating-IP: [172.20.2.21]
Subject: Re: [apps-discuss] Feedback on draft-ietf-appsawg-json-pointer-00
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: Fri, 02 Mar 2012 22:34:35 -0000

On 03/01/2012 01:45 PM, Paul C. Bryan wrote:
> On Thu, 2012-03-01 at 12:14 -0800, Mike Acar wrote:

>> There's also the question of JSON documents with different encodings;

> Since they're logically the same underlying Unicode representations, I'm
> not sure there's any issue to consider here.

Probably not in practice; as you and I discussed off-list, most 
implementations will not actually be working on the JSON texts themselves.

>> Another issue is that the evaluation scheme implies some application
>> semantics.

>> It's easy to imagine a case where a Pointer refers to a deep hierarchy,
>> e.g. /a/b/c/d, and the application semantics of following it are to
>> create automatically any non-existent intermediate objects.
>>
>> My initial thought was that the Pointer RFC should explicitly say that
>> specs which use it (e.g. Patch) should define semantics for ambiguous
>> cases (non-unique or non-existent member names, array index out of
>> bounds, etc).

There is another case: What to do if a non-terminal reference token 
names a value which is not a structured type; e.g.

{ "a" : "b" }

How should you interpret "/a/c/d"? For Patch this should be an error, 
but another application might promote the value of "a" from a string to 
an object or array. If the Pointer RFC says this MAY be an error, it 
disallows those semantics.

>> That can still result in a user of Pointer having to implement it
>> himself, if there are no implementations which offer him precisely
>> what he needs.
>>
>> Is it preferrable to explicitly say "You must make these decisions
>> for your use case" instead of "Behavior in these cases is
>> undefined"?
>
> I'm not sure. I'm open to suggestions from the apps working group...

-- 
Mike Acar -                                 - macar at cloudmark dot com