Service serialization and deserialization.