Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ When the sample code calls the serializer, it uses a <xref:System.Text.Json.Json

The preceding example only does serialization, but a similar approach can be adopted for deserialization.

### ReferenceResolver limitations with custom converters

When you use <xref:System.Text.Json.Serialization.ReferenceHandler.Preserve%2A>, be aware that reference handling state isn't preserved when the serializer calls into a custom converter. This means that if you have a custom converter for a type that's part of an object graph being serialized or deserialized with reference preservation enabled, the converter won't have access to the current <xref:System.Text.Json.Serialization.ReferenceResolver> instance.

## Other custom converter samples

The [Migrate from Newtonsoft.Json to System.Text.Json](migrate-from-newtonsoft.md) article contains additional samples of custom converters.
Expand Down