How do I add validation during the serialization process?
I have a requirement to perform YAML file version conversion. The method I use is to use features to identify the versions of some fields in the entity class, and then verify the version during serialization to choose whether to serialize this field. Is there any method? The structure of the entity class will look like: