es.serializeAttachments( instance as Object, format as String ) as Object
This function is deprecated and will be removed in a future release.
A utility function used to serialize the attachments on an instance
into either JSON or XML envelopes.
Parameters | |
---|---|
instance | The instance whose attachments are to be serialized. |
format | The format in which to serialize the attachments. Must be one of "json" or "xml". |
If the data format specified in the format
does not
match the format of an attachment, then that attachment is serialized
as a string. For example, if an attachment is an XML element and the
requested format is JSON, then the attachment is serialized as the
string representation of the XML.