Re: [apps-discuss] draft-pbryan-json-patch-04 - comments

Mike Acar <macar@cloudmark.com> Mon, 12 March 2012 20:53 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 2550121F8A03 for <apps-discuss@ietfa.amsl.com>; Mon, 12 Mar 2012 13:53:48 -0700 (PDT)
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=[AWL=0.000, 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 uX4iSQ86V2m6 for <apps-discuss@ietfa.amsl.com>; Mon, 12 Mar 2012 13:53:47 -0700 (PDT)
Received: from ht1-outbound.cloudmark.com (ht1-outbound.cloudmark.com [72.5.239.25]) by ietfa.amsl.com (Postfix) with ESMTP id D494821F86F9 for <apps-discuss@ietf.org>; Mon, 12 Mar 2012 13:53:42 -0700 (PDT)
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; Mon, 12 Mar 2012 13:53:42 -0700
Message-ID: <4F5E6255.9040402@cloudmark.com>
Date: Mon, 12 Mar 2012 13:53:41 -0700
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: <9F0A2492-AE7D-4C12-8BB0-13489FD7F6C1@gmail.com> <1331271383.6504.1.camel@neutron>
In-Reply-To: <1331271383.6504.1.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] draft-pbryan-json-patch-04 - comments
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: Mon, 12 Mar 2012 20:53:48 -0000

Hi,

On 03/08/2012 09:36 PM, Paul C. Bryan wrote:
> On Thu, 2012-03-08 at 13:46 -0800, Vadim Zaliva wrote:
>> I was looking for JSON patch formats available and found this draft.
>> It looks nice - concise and to the point. I would like to share few
>> comments I have.
>>
>> 1. I am not sure if 'test' operation should be part of it. The purpose
>> of the patch is to modify the document. 'test' operation either
>> succeeds of fails, but it is unclear how this information will be
>> communicated or used. It almost looks like a API operation rather than
>> patch format instruction.

I'm unsure about test as well. It seems strange to me to express "change 
this document if it looks like this" in a patch; if the application 
creating the patch doesn't know how the document looks, how can it 
create a patch?

>> I could see a case when it could be included as a part of conditional
>> syntax. In this case 'test' becomes a container for other operations
>> which would be executed only if the test succeeds.

I'm even more unsure about this. Could you nest them, for example?

> I'd be interested in others' views on this.

Paul, is there an archived discussion of the "test" operation, 
particularly regarding use cases?

-- 
Mike Acar -                                 - macar at cloudmark dot com