Serialize the value