Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0 updates to System.Text.Json docs #21108

Merged
merged 52 commits into from
Nov 5, 2020
Merged

5.0 updates to System.Text.Json docs #21108

merged 52 commits into from
Nov 5, 2020

Conversation

tdykstra
Copy link
Contributor

@tdykstra tdykstra commented Oct 14, 2020

Fixes #21313

Document new features in 5.0 for System.Text.Json.

There are other outstanding issues for the System.Text.Json docs, this one addresses only the new features for 5.0.

Internal review URL - how-to doc
Internal review URL - migration doc
Internal review URL - custom converters doc

@adegeo
Copy link
Contributor

adegeo commented Oct 16, 2020

Close/reopen to see if snippets system can download the latest .net rc or not...

@adegeo adegeo closed this Oct 16, 2020
@adegeo adegeo reopened this Oct 16, 2020
@adegeo adegeo closed this Oct 16, 2020
@adegeo adegeo reopened this Oct 16, 2020
@tdykstra tdykstra changed the title WIP: Test zone pivots for versions WIP: 5.0 updates to System.Text.Json docs Oct 19, 2020
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's a WIP, but was reading through anyway.

docs/standard/serialization/system-text-json-how-to.md Outdated Show resolved Hide resolved
docs/standard/serialization/system-text-json-how-to.md Outdated Show resolved Hide resolved
@tdykstra tdykstra requested a review from a team as a code owner October 27, 2020 18:54
@tdykstra tdykstra removed the request for review from a team October 27, 2020 19:19
Copy link
Contributor

@layomia layomia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. LGTM after these comments are addressed.

@@ -246,7 +421,7 @@ To implement type inference for `object` properties, create a converter like the
* `NullValueHandling` is set to `Ignore`, and
* During deserialization, the JSON contains a null value for a non-nullable value type.

In the same scenario, <xref:System.Text.Json> does throw an exception. (The corresponding null handling setting is <xref:System.Text.Json.JsonSerializerOptions.IgnoreNullValues?displayProperty=nameWithType>.)
In the same scenario, <xref:System.Text.Json> does throw an exception. (For the corresponding null-handling setting in `System.Text.Json`, see [Conditionally ignore a property](#conditionally-ignore-a-property).)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this link to notes about per-property ignoring or the global setting i.e. DefaultIgnoreCondition.WhenWritingDefault?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the equivalent here is JsonSerializerOptions.IgnoreNullValues, which I removed from the main how-to doc per your comment:

I'm not sure we should advertise this. IgnoreNullValues is obsolete starting in .NET 6.0, and we couldn't think of when it makes sense to ignore a null value received when deserializing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document new features in 5.0 for System.Text.Json
7 participants