ietf
[Top] [All Lists]

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

2012-12-11 19:15:22

On 12/12/2012, at 12:01 PM, Barry Leiba <barryleiba(_at_)computer(_dot_)org> 
wrote:

I understand that this will change implementations -- patches that
used to use "add" will now have to use "replace", and there's now no
way to do "add this if it's not already there, and replace it if it is
already there".

That was a very desirable feature for many people in the WG.

Personally -- to me, it seems like you're getting hung up on the word "add." 
We've had a few bits of feedback, where people try to map a particular meaning 
of one of the operation names to a programming language or other system. In 
this format, "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.

That said, if changing the operation name would make things easier, I'd be OK 
with that; e.g., "set." However, I suspect doing so would just raise issues 
from other people who are used to having "set" mean something slightly 
different.


Perhaps there's a need to add something with those
semantics.  On the other hand, as the text stands now, there's no way
to do "add this only if it's not already there", because "test" can't
test for existence.


We discussed having a test for existence in the WG, but there was agreement 
that it wasn't important enough to justify the added complexity. YMMV, of 
course.

Cheers,


--
Mark Nottingham   http://www.mnot.net/




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