The nested XSystemTextJsonConverter class being internal causes JSON source generation to fail when the value object is in a different assembly; since the generated code wouldn't be able to reference it.
Open up Program.cs and look at the warning on JsonContext:
dotnet run --project ./Two
An exception is thrown too.
Expected behaviour
This is likely caused by the fact that the nested converter class has an internal access modifier, and therefore the JSON source generator can't "see" it.
Describe the bug
The nested
XSystemTextJsonConverter
class beinginternal
causes JSON source generation to fail when the value object is in a different assembly; since the generated code wouldn't be able to reference it.Steps to reproduce
dotnet restore
Program.cs
and look at the warning onJsonContext
:dotnet run --project ./Two
Expected behaviour
This is likely caused by the fact that the nested converter class has an
internal
access modifier, and therefore the JSON source generator can't "see" it.