couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul C. Bryan" <>
Subject Re: JSON Patch Internet Draft 01
Date Fri, 10 Jun 2011 17:20:55 GMT
On Thu, 2011-06-09 at 16:39 -0700, Eli Stevens (Gmail) wrote:


> I think that it should be possible to specify what value should be
> present when removing something.  Text-based patches don't just say
> "remove line 42" they also spell out what content is expected to be
> there before removal.  Similarly, I think that supporting context
> verification is important.  Something like the following being applied
> to the resulting doc above:

I am inclined to leverage HTTP conditions (e.g. If-Match) to ensure
resource state rather than try to build additional tests and concurrency
mechanisms into the patch format.


> For what it's worth, I don't think that using a list of strings for
> the pointer is bad at all.  Why invent a new string sub-syntax when
> you can use an existing JSON structure?  Having wasted more hours of
> my professional life lamenting trying to cram arbitrary user data into
> the path portion of a URL than I care to admit, I can't recommend the
> approach.  Spelling the separator as "," instead of / isn't that big
> of a deal, esp. when for simple cases with a full JS interpreter
> handy, one could use "/a/b/c".split("/").

There is a clear need for a scheme to identify a JSON node within a URI
fragment—this is what JSON Schema uses; I would rather leverage that
scheme than deviate from it and invent yet another for JSON Patch.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message