← All recipes
Moderne licensed

Find JsonSerializerOptions.IgnoreNullValues usage (SYSLIB0020)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.FindIgnoreNullValuesArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds usages of JsonSerializerOptions.IgnoreNullValues which is obsolete in .NET 6 (SYSLIB0020). Use DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull instead.

Single recipeserializationsearchdotnetnet6Proprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.FindIgnoreNullValues

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet