This could be in the same class as the deserialization.