jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "Jsop" by ThomasMueller
Date Tue, 01 Nov 2011 15:22:35 GMT
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

Mime
View raw message