Re: Last Call: <draft-ietf-appsawg-json-patch-08.txt> (JSON Patch) to Proposed Standard

Barry Leiba <> Wed, 12 December 2012 04:25 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 7C11521F8675; Tue, 11 Dec 2012 20:25:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -103.077
X-Spam-Status: No, score=-103.077 tagged_above=-999 required=5 tests=[AWL=-0.100, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Izz8ihkdCaVS; Tue, 11 Dec 2012 20:25:18 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 7F3A021F869E; Tue, 11 Dec 2012 20:25:17 -0800 (PST)
Received: by with SMTP id c1so216116lbg.18 for <multiple recipients>; Tue, 11 Dec 2012 20:25:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=CzI6CZAfnJ2XoKhPW+I4ip0b3qNUNO0jGQTf/Kpz7KM=; b=hK3UOfGUN29LXoGMfJDGj3BfmLNCeXKC9aJrnCmOrakd/RbH8DtHqq7Qe211+rEwjd 9y8bJa7iBSPmjRCyHD4DrK/3aq5YYALLH40Cx0F89nNHNNxPP/9xIikImn9u34MGq0TG Z+R7IbtFSeO7kYvia5Ga97V4VzZX6+8IjM8YypMsEgAfAR4F0E0aOPzk5ElJCd4vb6kA t0jatRaG6LyRMrYoVGsFnaqctK3Z3oaXr4AtsUGqbtx1o44TWKL0yNYhdpqMSI5N3uPw 0PcG9eWdbwM1Mnh2tnAiaQ3f2jkAfxTwn0FeEJHZn53yx1h7tcnR+09pNyB0Ea7oHr06 hh+w==
MIME-Version: 1.0
Received: by with SMTP id in4mr5880lab.35.1355286316205; Tue, 11 Dec 2012 20:25:16 -0800 (PST)
Received: by with HTTP; Tue, 11 Dec 2012 20:25:15 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <> <> <>
Date: Tue, 11 Dec 2012 23:25:15 -0500
X-Google-Sender-Auth: D4A9R_iy92eFRV18Ki8Z_C9WKik
Message-ID: <>
Subject: Re: Last Call: <draft-ietf-appsawg-json-patch-08.txt> (JSON Patch) to Proposed Standard
From: Barry Leiba <>
To: Mark Nottingham <>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: IETF discussion list <>, "" <>
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF-Discussion <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 12 Dec 2012 04:25:19 -0000

> Personally -- to me, it seems like you're getting hung up on the word "add."
> "add" means what the format definition says it means, because otherwise
> we have to rationalise all of the different systems people might use it with
> to make sense.

OK, I'll buy that.  Then let's take a different approach, and make it
clearer that it's Humpty Dumpty's version of "add", so maybe neither I
nor Alice will get hung up on it:

   The "add" operation adds a new value at the target location. The
   operation object MUST contain a "value" member that specifies the
   value to be added.
   The "add" operation performs the following function, depending upon
   what the target location references (see details below):

   o  If the target location specifies an array index, a new value is
      inserted into the array at the specified index.

   o  If the target location specifies an object member that does not
      already exist, a new member is added to the object.

   o  If the target location specifies an object member that does
      exist, that member's value is replaced.

That may be wordier than we need, but I think it makes the point...
feel free to wordsmith.  With something like that, I think we can say
that we had to pick a name, "add" was picked, and it means exactly
what we choose it to mean - neither more nor less.  And that's glory
for you.