Support serialize/deserialize.