<PackageReference Include="System.Text.Json" Version="10.0.0-preview.2.25163.2" />

JsonIgnoreCondition

public enum JsonIgnoreCondition
Controls how the JsonIgnoreAttribute ignores properties on serialization and deserialization.
namespace System.Text.Json.Serialization { public enum JsonIgnoreCondition { Never, Always, WhenWritingDefault, WhenWritingNull, WhenWriting, WhenReading } }