Serialize all three types of document.