MarkLogic Server 11.0 Product Documentation
es.serializeAttachments

es.serializeAttachments(
   instance as Object,
   format as String
) as Object

Summary

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".

Usage Notes

You will not usually call this function outside of code generated by Entity services. The generated code uses this function to serialize attachments when constructing envelope documents.

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.

See Also

Powered by MarkLogic Server | Terms of Use | Privacy Policy