Skip to content

5.0 updates to System.Text.Json docs - #21108

Merged
tdykstra merged 52 commits into
dotnet:masterfrom
tdykstra:stj5a
Nov 5, 2020
Merged

5.0 updates to System.Text.Json docs#21108
tdykstra merged 52 commits into
dotnet:masterfrom
tdykstra:stj5a

Conversation

@tdykstra

@tdykstratdykstra commented Oct 14, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@adegeoadegeo closed this Oct 16, 2020
@adegeoadegeo reopened this Oct 16, 2020
@adegeoadegeo closed this Oct 16, 2020
@adegeoadegeo reopened this Oct 16, 2020
@tdykstratdykstra changed the title WIP: Test zone pivots for versionsWIP: 5.0 updates to System.Text.Json docsOct 19, 2020

@gewarrengewarren left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
@tdykstra
tdykstra requested a review from a team as a code ownerOctober 27, 2020 18:54
@tdykstra
tdykstra removed the request for review from a teamOctober 27, 2020 19:19
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated

@layomialayomia left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment threaddocs/standard/serialization/system-text-json-converters-how-to.md Outdated
* 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 nullhandling 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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.

Comment threaddocs/standard/serialization/system-text-json-how-to.md Outdated
Sign up for freeto 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

@tdykstra@adegeo@steveharter@layomia@jozkee@gewarren@dotnet-bot