ExtinctionOnline/ExtinctionOnline.Server/Communication/JsonUtil.cs
2022-11-05 17:34:58 +09:00

20 lines
502 B
C#

using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.Unicode;
namespace ExtinctionOnline.Server
{
public class JsonUtil
{
public static JsonSerializerOptions GetJsonOptions()
{
return new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
};
}
}
}