Make JSON Serialize/Deserialize using System.Text.Json native AOT compatible without using rd.xml

  • Avatar photo
  • 2023年7月3日

使用Source Generation方式以避免使用反射,可以AOT兼容。

Reference: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation