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

@tdykstra tdykstra 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

adegeo commented Oct 16, 2020

Copy link
Copy Markdown
Contributor

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

@gewarren gewarren 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 thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
@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
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
@tdykstra tdykstra requested review from jozkee and layomia October 30, 2020 20:51

@layomia layomia 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 thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-converters-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-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 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
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
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.

Comment thread docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md Outdated
Comment thread docs/standard/serialization/system-text-json-how-to.md Outdated
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