ExtinctionOnline/ExtinctionOnline.Server/Communication/JsonUtil.cs

20 lines
502 B
C#
Raw Normal View History

2022-11-04 22:05:08 +09:00
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.Unicode;
2022-11-05 17:34:58 +09:00
namespace ExtinctionOnline.Server
2022-11-04 22:05:08 +09:00
{
public class JsonUtil
{
public static JsonSerializerOptions GetJsonOptions()
{
return new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
};
}
}
}