Re: [apps-discuss] more feature requests, was: JSON patch: "test" operation

Julian Reschke <julian.reschke@gmx.de> Tue, 20 March 2012 16:46 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 DD13621F86A4 for <apps-discuss@ietfa.amsl.com>; Tue, 20 Mar 2012 09:46:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.355
X-Spam-Level:
X-Spam-Status: No, score=-104.355 tagged_above=-999 required=5 tests=[AWL=-1.756, 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 pR12Th9wFphp for <apps-discuss@ietfa.amsl.com>; Tue, 20 Mar 2012 09:46:56 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id EA19721F867C for <apps-discuss@ietf.org>; Tue, 20 Mar 2012 09:46:55 -0700 (PDT)
Received: (qmail invoked by alias); 20 Mar 2012 16:46:54 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp020) with SMTP; 20 Mar 2012 17:46:54 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX18ednhg9Uwe0m5fSjwXP/H8xhTPEvC8eHRmd+ydOV Rw2osIAGBGDd1Z
Message-ID: <4F68B47E.3010406@gmx.de>
Date: Tue, 20 Mar 2012 17:46:54 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: "Paul C. Bryan" <pbryan@anode.ca>
References: <4ED64A26.5030003@gmx.de> <BC564D94-6D00-4D63-863A-8AAD00E57B3A@tzi.org> <4ED77513.3070506@gmx.de> <6E443D75-D1AC-451F-9B17-115C9A6C7696@mnot.net> <4ED7F8C2.9030804@gmx.de> <37E09A53-E9F4-45D2-BB8F-79655BECDBB2@mnot.net> <1322779521.1958.1.camel@neutron> <4EFC8A08.7000105@gmx.de> <1325222688.18477.25.camel@neutron> <4F68AC76.40904@gmx.de> <1332261243.2171.8.camel@neutron>
In-Reply-To: <1332261243.2171.8.camel@neutron>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] more feature requests, was: JSON patch: "test" operation
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: Tue, 20 Mar 2012 16:46:57 -0000

On 2012-03-20 17:34, Paul C. Bryan wrote:
> This was discussed previously, and the consensus at the time was for
> must-understand.
> ...

OK; in which case 
<http://trac.tools.ietf.org/html/draft-ietf-appsawg-json-patch-01#section-4> 
should state this as an error condition. It currently says:

    The operation to perform is expressed in a member of the operation
    object.  The name of the operation member is one of: "add", "remove",
    "replace", "move", "copy" or "test".  The member value is a string
    containing a [JSON-Pointer] value, which references the location
    within the target document to perform the operation.  It is an error
    condition if an operation object contains no recognized operation
    member or more than one operation member.

So

     { "test": "/a/b/c", "value": "foo", "julians-extension" : "bar" }

would be legal (so you could augment each operation with additional 
information, but not the patch document itself).

Best regards, Julian