Transformation (serialization)
The RestObject exposes the means by which data is round trip serialized between the Salesforce API and the RestObject state.
toJson(opts)
toJson(opts)
Used to transform RestObject back to it's raw "SObject" form which will be accepted by the rest API.
KEY
TYPE
DESCRIPTION
dmlMode
all | insert | update | update_modified_only
Controls which data to serialize.
sendParentObj
boolean
Includes related parent objects. Defaults to false
.
sendChildObj
boolean
Includes related children lists. Defaults to false
.
hideAttributes
boolean
Hides the Attributes
property which contains the sObject type
name and url
. Defaults to false
.
fromSObject(data)
fromSObject(data)
Parses a raw "SObject" data (in API form) into a RestObject
. Useful when dealing with json directly from Salesforce.
Round Trip Serialization
Last updated
Was this helpful?