Add Document:serialize() method