jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mete Atamel <mata...@adobe.com>
Subject JSOP diff question
Date Fri, 28 Sep 2012 09:05:17 GMT

I have a question with JSOP diff syntax. Say I want to add a node "a" with
a property and value. This is the diff I use in the commit:

diff.append("+\"a\" : {\"prop\" : \"value\"}");

Is it legal to add "a" and then add its properties in 2 separate add
operations but in the same commit like this?

diff.append("+\"a\" : {}");
        diff.append("+\"a\" : {\"prop\" : \"value\"}");

Maybe it's not legal because it would try to add node "a" twice?

Also, is it legal to do the previous operation but with property in the
path like this?

        diff.append("+\"a\" : {}");
        diff.append("+\"a/prop\" : \"value\"");


View raw message