new PatchDeserializer( [sourceId])
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
sourceId |
olympe.dc.SourceType | string |
<optional> |
olympe.dc.SourceType.SERVER |
Methods
-
deserialize(operations)
-
Deserializes an array of patch operations into an GraphPatch.
This method is called when the array of operation is a subcomponent of a larger JSON structure, that is being parsed beforehand. In that case, the parsing is already done which makes calling deserializeJson() above irrelevant.
Parameters:
Name Type Description operations
Array.<Object> Patch operations as received by the server
Throws:
ErrorReturns:
The created patch
-
deserializeJson(json)
-
Return a graph patch containing all the data contained in the specified
json
string.Parameters:
Name Type Description json
string Returns:
-
setSourceId(sourceId)
-
Sets the source identifier for all deserialized instances
Parameters:
Name Type Description sourceId
string