1
0
mirror of synced 2024-11-24 04:20:10 +01:00
TaikoSoundEditor/Json.cs
2023-07-17 13:24:28 +03:00

26 lines
614 B
C#

using System.Diagnostics;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;
namespace TaikoSoundEditor
{
internal static class Json
{
public static T Deserialize<T>(string json)
{
return JsonSerializer.Deserialize<T>(json);
}
public static string Serialize<T>(T item)
{
return JsonSerializer.Serialize(item, new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
WriteIndented = true
});
}
}
}