using Newtonsoft.Json; using System.Globalization; namespace OverwatchTranscript { public static class Json { private static JsonSerializerSettings settings = new JsonSerializerSettings { Formatting = Formatting.None, NullValueHandling = NullValueHandling.Ignore, Culture = CultureInfo.InvariantCulture, DateFormatHandling = DateFormatHandling.IsoDateFormat, FloatFormatHandling = FloatFormatHandling.Symbol }; public static string Serialize(object obj, Formatting formatting = Formatting.None) { return JsonConvert.SerializeObject(obj, formatting, settings); } public static T Deserialize(string json) { return JsonConvert.DeserializeObject(json)!; } } }