Serialize with multiple types in the ValueHolder