public static T Deserialize<T>(string json) { T obj = Activator.CreateInstance<T>(); using (MemoryStream ms = new MemoryStream(Encoding.Unicode.GetBytes(json))) { obj = (T)JsonConvert.DeserializeObject(json, obj.GetType()); return obj; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)