dotnet / dotnet/dotnet-api-docs

Incorrect documentation for JsonIgnoreCondition.WhenWritingNull

Open
#7,964 2 comments 0 reactions 0 assignees View on GitHub
area-System.Text.Json doc-bug Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The documentation for [JsonIgnoreCondition.WhenWritingNull](https://docs.microsoft.com/dotnet/api/system.text.json.serialization.jsonignorecondition?view=net-6.0#system-text-json-serialization-jsonignorecondition-whenwritingnull) reads:

> If the value is null, the property is ignored during serialization. This is applied only to reference-type properties and fields.

whereas in fact it also applies to System.Nullable, which is presumably the desired behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.