incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul C. Bryan" <paul.br...@forgerock.com>
Subject Re: JSON Patch Internet-Draft 02
Date Sun, 23 Oct 2011 23:06:22 GMT
On Mon, 2011-10-24 at 08:42 +1000, Jamie Talbot wrote:

> Hi Paul,
> I don't think I've seen the prior discussions on this, so perhaps this
> has already been asked and answered.  With regards to adding to
> objects, am I right in assuming that multiple levels can be accessed
> through / separators?  To extend example A1:
> 
> An example target JSON document:
> 
> { "foo": "bar" }
> 
> A JSON Patch document:
> 
> [ { "add": "/baz/bud", "value": "qux" } ]
> 
> Might end up something like this:
> 
> {
>   "foo": "bar",
>   "baz": {	
>     "bud": "qux"
>   }
> }


Based on your example target JSON document, in my current
implementation, your JSON Patch document would fail because there is no
"/baz" object to add "bud" to. The JSON Patch document that would
achieve what you're suggesting would be:

[
  { "add": "/baz", "value": { "bud": "qux" } }
]

Based on this, I can see the need to be clearer on how JSON Pointers
should be interpreted to clear the difference between these, and to
create a few non-trivial examples to illustrate.


> Is that the intention?  If so, you might want to consider at least one
> example that shows that behaviour.  If that's not the intention, do
> you have an objection to it?
> Cheers,
> 
> Jamie.
> 
> On Mon, Oct 24, 2011 at 07:35, Paul C. Bryan <paul.bryan@forgerock.com> wrote:
> > I've posted the third draft of the JSON Patch Internet-Draft to the
> > IETF:
> >
> > http://tools.ietf.org/html/draft-pbryan-json-patch-02
> >
> > It should address all of the outstanding issues that have been raised to
> > date. Your feedback is welcome.
> >
> > Paul
> >

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