Adapter: jsonPatch

AeroGear.DiffSyncEngine.adapters. jsonPatch

new jsonPatch() → {Object}

Status: Experimental
The jsonPath adapter.
Source:
Returns:
The created adapter
Type
Object

Methods

addDocument(doc)

Adds a new document to this sync engine.
Parameters:
Name Type Description
doc the document to add.
Source:

diff(doc) → {object}

Performs the client side of a differential sync. When a client makes an update to it's document, it is first diffed against the shadow document. The result of this is an Edits instance representing the changes. There might be pending edits that represent edits that have not made it to the server for some reason (for example packet drop). If a pending edit exits the contents (the diffs) of the pending edit will be included in the returned Edits from this method.
Parameters:
Name Type Description
doc the updated document.
Source:
Returns:
containing the diffs that between the clientDoc and it's shadow doc.
Type
object

patch(patchMsg)

Performs the client side patch process.
Parameters:
Name Type Description
patchMsg the patch message that is sent from the server
Source: