Hi Paul, That makes sense. I was thinking of something along the lines of "mkdir -p /non/existent/path/new/". Your alternative is obviously equivalent, if a little more verbose.
Cheers, Jamie. On Mon, Oct 24, 2011 at 09:06, Paul C. Bryan <[email protected]> wrote: > 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 <[email protected]> >> 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 >> > > -- --- http://jamietalbot.com
