Serialization/deserialization for v1 objects.