jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: JSOP vs JSON-Patch, was: [Jackrabbit Wiki] Update of "Jsop" by stefan
Date Wed, 21 Mar 2012 16:21:55 GMT
On Wed, Mar 21, 2012 at 5:05 PM, Julian Reschke <julian.reschke@gmx.de> wrote:
> On 2012-03-21 16:28, Julian Reschke wrote:
>> ...
>
> OK, here's an attempt to rewrite in IETF ABNF:

great, thanks!

>
> -- snip --
> 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 =   <see RFC4627, Section 2.3>
> false =   <see RFC4627, Section 2.1>
> null =    <see RFC4627, Section 2.1>
> number =  <see RFC4627, Section 2.4>
> object =  <see RFC4627, Section 2.2>
> string =  <see RFC4627, Section 2.5>
> true =    <see RFC4627, Section 2.1>
> ws =      <see RFC4627, Section 2.1>
> -- snip --
>
> Open issues:

commenting below from the microkernel POV...

>
> 1) JSON's ws allows CR LF, and it can occur in arrays and objects. Is this
> true for JSOPDIFF as well?

yes

>
> 2) I left out METADATA and EXTENSION for now
>
> 3) Does JSOPDIFF require anything special between diffs? Are they supposed
> to start on new lines?

there are no special requirements for separating the diffs.

>
> 4) The way the grammar is written makes it hard to extend, we may want to
> generalize it into simply
>
> diffs =   *( ws op ws )
>
> op    =   VCHAR ws pointer ws ":" ws ( object / atom / array )
>
> and then describe the individual operations separately.

agreed, makes sense.

cheers
stefan

>
> Feedback appreciated, Julian
>
>

Mime
View raw message