File tree Expand file tree Collapse file tree
GameFrameX.Foundation.Json Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using System . Text . Encodings . Web ;
22using System . Text . Json ;
33using System . Text . Json . Serialization ;
4+ using System . Text . Unicode ;
45
56namespace GameFrameX . Foundation . Json ;
67
@@ -33,7 +34,7 @@ public static class JsonHelper
3334 ReferenceHandler = ReferenceHandler . IgnoreCycles ,
3435 // 忽略注释
3536 ReadCommentHandling = JsonCommentHandling . Skip ,
36- // 使用 JavaScriptEncoder.UnsafeRelaxedJsonEscaping 进行编码
37+ // 使用 UnicodeJsonEncoder.Singleton 进行编码,不转义中文字符和Emoji
3738 Encoder = UnicodeJsonEncoder . Singleton ,
3839 // 不使用属性名称转换
3940 PropertyNamingPolicy = null ,
@@ -81,7 +82,7 @@ public static class JsonHelper
8182 ReferenceHandler = ReferenceHandler . IgnoreCycles ,
8283 // 忽略注释
8384 ReadCommentHandling = JsonCommentHandling . Skip ,
84- // 使用 JavaScriptEncoder.UnsafeRelaxedJsonEscaping 进行编码
85+ // 使用 UnicodeJsonEncoder.Singleton 进行编码,不转义中文字符和Emoji
8586 Encoder = UnicodeJsonEncoder . Singleton ,
8687 // 不使用属性名称转换
8788 PropertyNamingPolicy = null ,
You can’t perform that action at this time.
0 commit comments