Document serialization.