Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AFF89718 for ; Fri, 28 Sep 2012 09:06:02 +0000 (UTC) Received: (qmail 49381 invoked by uid 500); 28 Sep 2012 09:06:01 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 49160 invoked by uid 500); 28 Sep 2012 09:05:55 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 49122 invoked by uid 99); 28 Sep 2012 09:05:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Sep 2012 09:05:54 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matamel@adobe.com designates 64.18.1.35 as permitted sender) Received: from [64.18.1.35] (HELO exprod6og115.obsmtp.com) (64.18.1.35) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Sep 2012 09:05:45 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob115.postini.com ([64.18.5.12]) with SMTP ID DSNKUGVoVLGBb0D4oADync32vuiQoTOS4VUJ@postini.com; Fri, 28 Sep 2012 02:05:25 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q8S92l5I018189 for ; Fri, 28 Sep 2012 02:02:47 -0700 (PDT) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q8S95NLc006187 for ; Fri, 28 Sep 2012 02:05:24 -0700 (PDT) Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by nacas01.corp.adobe.com ([10.8.189.99]) with mapi; Fri, 28 Sep 2012 02:05:23 -0700 From: Mete Atamel To: "oak-dev@jackrabbit.apache.org" Date: Fri, 28 Sep 2012 02:05:17 -0700 Subject: JSOP diff question Thread-Topic: JSOP diff question Thread-Index: Ac2dWGQ3y2BKFgsTR+iQa+MzKb1F/w== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.4.120824 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi,=20 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\""); Thanks, Mete