Documentgets serialized to XML or JSON. Specific implementations may want to modify some properties of the document before it gets serialized
document- the documents being serialized. Note: changes to the document will not be undone after serialization completes.
otherFieldsForSerialization- custom fields that are about to be serialized. Changes made on this map will not affect the contents of the document.