-
Notifications
You must be signed in to change notification settings - Fork 6.1k
More about how to preserve references #22322
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
Conversation
luisquintanilla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tdykstra LGTM.
layomia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
|
|
||
| ::: zone pivot="dotnet-5-0" | ||
|
|
||
| By default, reference data is only cached for each call to <xref:System.Text.Json.JsonSerializer.Serialize%2A> or <xref:System.Text.Json.JsonSerializer.Deserialize%2A>. To persist references from one `Serialize`/`Deserialize` call to another one, root the <xref:System.Text.Json.Serialization.ReferenceResolver> instance in the call site of `Serialize`/`Deserialize`. The following code shows an example for this scenario: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this example covers serialization, maybe mention somewhere in this section that a similar approach can be adopted for deserialization.
docs/standard/serialization/system-text-json-preserve-references.md
Outdated
Show resolved
Hide resolved
…es.md Co-authored-by: Layomi Akinrinade <[email protected]>
Fixes #21777
Internal review URL - converters
Internal review URL - preserve references