You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by Apache Wiki <wi...@apache.org> on 2011/11/01 16:22:35 UTC

[Jackrabbit Wiki] Update of "Jsop" by ThomasMueller

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 ThomasMueller:
http://wiki.apache.org/jackrabbit/Jsop

New page:
== Jsop ==

<<TableOfContents>>

== Overview ==

Jsop is the proposed Json-Diff format. It extends the Json format to provide diff/patch features.

== Syntax ==

'''jsop:'''
 * diff
 * diff jsop

A Jsop string contains one or multiple Jsop diff lines.

'''diff:'''
 * addNodeDiff
 * addPropertyDiff
 * setPropertyDiff
 * moveNodeDiff
 * removeNodeDiff
 * removePropertyDiff

A diff line can contain the information about adding nodes (possibly multiple nested nodes), adding a property to a node, setting a property, moving a node, or removing a node or property.

'''addNodeDiff:'''
 * + pathString: object

'''addPropertyDiff:'''
 * + pathString: propertyValue

'''setPropertyDiff:'''
 * ^ pathString: propertyValue

'''moveNodeDiff:'''
 * > pathString: newPathString
 * > pathString: { positionString: newPathString }

'''positionString:'''
 * "before"
 * "after"
 * "first"
 * "last"

'''removeNodeDiff:'''
 * - pathString

'''removePropertyDiff:'''
 * ^ pathString: null

Setting the value to null will remove the property.

'''propertyValue:'''
 * string
 * number
 * array
 * true
 * false

A property value can be any value, except for a object itself.
  
'''object:'''
 * {}
 * { members }

'''members:'''
 * pair
 * pair, members

'''pair:'''
 * string: value

'''array:'''
 * []
 * [ elements ]

'''elements:'''
 * value 
 * value, elements

'''value:'''
 * string
 * number
 * object
 * array
 * true
 * false
 * null