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 D169A9937 for ; Fri, 23 Mar 2012 17:05:20 +0000 (UTC) Received: (qmail 58009 invoked by uid 500); 23 Mar 2012 17:05:20 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 57984 invoked by uid 500); 23 Mar 2012 17:05:20 -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 57974 invoked by uid 99); 23 Mar 2012 17:05:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 17:05:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of julian.reschke@gmx.de designates 213.165.64.23 as permitted sender) Received: from [213.165.64.23] (HELO mailout-de.gmx.net) (213.165.64.23) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 23 Mar 2012 17:05:12 +0000 Received: (qmail invoked by alias); 23 Mar 2012 17:04:51 -0000 Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp041) with SMTP; 23 Mar 2012 18:04:51 +0100 X-Authenticated: #1915285 X-Provags-ID: V01U2FsdGVkX1/zl99n7hDzr8HzYF1GyaD7JnNwTn4cOlF16UOhgv g2MoPRyPp0lf0Q Message-ID: <4F6CAD30.5050302@gmx.de> Date: Fri, 23 Mar 2012 18:04:48 +0100 From: Julian Reschke User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: oak-dev@jackrabbit.apache.org CC: David Nuescheler Subject: Fwd: [Jackrabbit Wiki] Update of "Jsop" by JulianReschke References: <20120323165121.52231.36040@eos.apache.org> In-Reply-To: <20120323165121.52231.36040@eos.apache.org> X-Forwarded-Message-Id: <20120323165121.52231.36040@eos.apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org I have updated the Wiki page with an IETF ABNF variant of the JSOP Diff syntax. Open questions are: - JSON Patch (the IETF spec) allows set operations with objects; JSOP Diff didn't need it yet (as it's for overwriting properties); we probably should allow it in order to remove the mismatch (same for "test") - are pointers escaped the same way as in JSON Pointers or not? As we do not need "/" in names, we probably can get away without escaping, but then JSOP-Diff wouldn't be able to express all JSON-Patch documents - extensibility / metadata are not addressed yet As a next step we should document the mapping between these two formats (while noting the remaining differences). That way we can define the semantics of a JSOP-Diff instance in terms of JSON Patch, we should be on the IETF Standards Track in the not-to distant future. Best regards, Julian -------- Original Message -------- Subject: [Jackrabbit Wiki] Update of "Jsop" by JulianReschke Date: Fri, 23 Mar 2012 16:51:21 -0000 From: Apache Wiki Reply-To: dev@jackrabbit.apache.org To: Apache Wiki Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification. The "Jsop" page has been changed by JulianReschke: http://wiki.apache.org/jackrabbit/Jsop?action=diff&rev1=43&rev2=44 STRING ::= /* See RFC 4627, Section 2.5 */ NUMBER ::= /* See RFC 4627, Section 2.4 */ }}} + + IETF ABNF variant: + {{{ + diffs = *( ws ( add / set / remove / move / copy / test ) ws ) + + add = "+" ws pointer ws ":" ws ( object / atom / array ) + copy = "*" ws pointer ws ":" ws pointer + move = ">" ws pointer ws ":" ws pointer + remove = "-" ws pointer + set = "^" ws pointer ws ":" ws ( atom / array ) ; object? + test = "?" ws pointer ws ":" ws ( atom / array ) ; object? + + atom = string / number / false / null / true + + pointer = string + + ; JSON + array = + false = + null = + number = + object = + string = + true = + ws = + }}} + + A [[http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsopParser.java?view=markup|parser]], and a simple [[http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/json/JsopParserTest.java?view=markup|test case]] for this syntax is available from the sandbox. Also available are a [[http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopTokenizer.java?view=markup|tokenizer]], a [[http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java?view=markup|builder]], and a [[http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopStream.java?view=markup|Jsop writer / reader]]. Those implementations are token based, and therefore not limited to the JSOP format described here.