dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.27k stars 5.9k forks source link

No instructions for registering JsonConverterFactory implementations #40643

Open brandonh-msft opened 6 months ago

brandonh-msft commented 6 months ago

Type of issue

Missing information

Description

The documentation elaborates very well how to register a custom converter, however, it shows how and when to create a converter factory but not how to register said factory.

Page URL

https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/converters-how-to?pivots=dotnet-8-0#sample-factory-pattern-converter

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/serialization/system-text-json/converters-how-to.md

Document Version Independent Id

678c4f23-764a-7ccd-0d6d-159a30957477

Article author

@gewarren

Metadata

NikoGJ commented 2 months ago

According to the code, a JsonConverterFactory inherits from JsonConverter, so the factory should have to be registered the same way as for other custom converters.