Hi @Haibo Yang ,
You can refer to the document How to use source generation in System.Text.Json.
It is also recommended that you post your problem on the github issue if the document does not help.
https://github.com/dotnet/runtime/issues
Best Regards.
Jiachen Li
----------
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.