I want to use JsonIgnore only when deserializing with System.Text.Json #34404
Labels
area-System.Text.Json
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
Milestone
I use Json for the configuration file of the application.
The format of the configuration file changes with the version upgrade of the application, and certain properties may become invalid.
In such cases, we need to make it readable for compatibility with the old configuration file, but we do not want to output to the new configuration file.
I want to be able to do this.
JsonIgnore
attribute, both serialization and deserialization will be invalid.IgnoreNullValues
option, properties that you want to output as null will also disappear.Ideally, doing something like
[JsonIgnore(IgnoreDeserialize=false)]
would allow for control of serialization and deserialization.Please consider it.
The text was updated successfully, but these errors were encountered: