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

Mike Acar <macar@cloudmark.com> Wed, 21 March 2012 17:01 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 5B69621F85AF for <apps-discuss@ietfa.amsl.com>; Wed, 21 Mar 2012 10:01:58 -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 be54hihRef1T for <apps-discuss@ietfa.amsl.com>; Wed, 21 Mar 2012 10:01:57 -0700 (PDT)
Received: from ht1-outbound.cloudmark.com (ht1-outbound.cloudmark.com [72.5.239.25]) by ietfa.amsl.com (Postfix) with ESMTP id D847121F856C for <apps-discuss@ietf.org>; Wed, 21 Mar 2012 10:01:57 -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; Wed, 21 Mar 2012 10:01:56 -0700
Message-ID: <4F6A0985.8030208@cloudmark.com>
Date: Wed, 21 Mar 2012 10:01:57 -0700
From: Mike Acar <macar@cloudmark.com>
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: Julian Reschke <julian.reschke@gmx.de>
References: <9F0A2492-AE7D-4C12-8BB0-13489FD7F6C1@gmail.com> <1331271383.6504.1.camel@neutron> <4F5E6255.9040402@cloudmark.com> <1331651889.3301.5.camel@neutron> <4F6914D7.5050505@cloudmark.com> <4F697867.2050500@gmx.de>
In-Reply-To: <4F697867.2050500@gmx.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Originating-IP: [172.20.2.21]
Cc: apps-discuss@ietf.org
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: Wed, 21 Mar 2012 17:01:58 -0000

On 03/20/2012 11:42 PM, Julian Reschke wrote:

> What makes you think it's optional?

I don't see anything in the spec that requires a test operation in a 
patch. So this conforms:

[
    { "add": "/a/b/c", "value": [ "foo", "bar" ] },
    { "remove": "/foo/bar/baz" }
]

Similarly, this conforms:

[
    { "add": "/a/b/c", "value": [ "foo", "bar" ] },
    { "test": "/a/b/c", "value": [ "foo", "bar" ] }
]

Whether those patch docs make any sense is a question of a particular 
use case.

-- 
Mike Acar -                                 - macar at cloudmark dot com