ietf
[Top] [All Lists]

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

2012-12-11 22:25:56
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:

OLD
   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.
NEW
   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.
END

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.

Barry

<Prev in Thread] Current Thread [Next in Thread>