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

"Paul C. Bryan" <pbryan@anode.ca> Tue, 13 March 2012 15:18 UTC

Return-Path: <pbryan@anode.ca>
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 CD01F21F8924 for <apps-discuss@ietfa.amsl.com>; Tue, 13 Mar 2012 08:18:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 MDzmfD2nCOXU for <apps-discuss@ietfa.amsl.com>; Tue, 13 Mar 2012 08:18:13 -0700 (PDT)
Received: from maple.anode.ca (maple.anode.ca [72.14.183.184]) by ietfa.amsl.com (Postfix) with ESMTP id 5A65321F8923 for <apps-discuss@ietf.org>; Tue, 13 Mar 2012 08:18:13 -0700 (PDT)
Received: from [192.168.1.119] (unknown [209.97.219.224]) by maple.anode.ca (Postfix) with ESMTPSA id 847556456 for <apps-discuss@ietf.org>; Tue, 13 Mar 2012 15:18:12 +0000 (UTC)
Message-ID: <1331651889.3301.5.camel@neutron>
From: "Paul C. Bryan" <pbryan@anode.ca>
To: apps-discuss@ietf.org
Date: Tue, 13 Mar 2012 08:18:09 -0700
In-Reply-To: <4F5E6255.9040402@cloudmark.com>
References: <9F0A2492-AE7D-4C12-8BB0-13489FD7F6C1@gmail.com> <1331271383.6504.1.camel@neutron> <4F5E6255.9040402@cloudmark.com>
Content-Type: multipart/alternative; boundary="=-W5D12aLnkSY26b6dfo9h"
X-Mailer: Evolution 3.2.2-1
Mime-Version: 1.0
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: Tue, 13 Mar 2012 15:18:13 -0000

On Mon, 2012-03-12 at 13:53 -0700, Mike Acar wrote:

> 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'm surprised that it seems so strange, as this is very much like how
text-based diff/patches work. It allows assumptions about the state of
the resource being modified to be a precondition to successfully
modifying the resource. With HTTP, it's ideal if precondition headers be
used, but this is not always feasible, nor is HTTP the only avenue for
using JSON Patch.


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


This was originally discussed on the JSON Patch Google Group discussion.

Paul