namespace FullSerializer { public class JsonHelper { public static string Serialize(T data) { var fsSerializer = new fsSerializer(); fsSerializer.TrySerialize(typeof(T), data, out var fsData) .AssertSuccessWithoutWarnings(); return fsJsonPrinter.PrettyJson(fsData); } public static T Deserialize(string jsonData) where T : new() { var result = new T(); var fsSerializer = new fsSerializer(); var fsData = fsJsonParser.Parse(jsonData); fsSerializer.TryDeserialize(fsData, ref result).AssertSuccessWithoutWarnings(); return result; } } }