using System.Collections.Generic;
public static void Main()
IMyInterface c=new MyClass();
var _jsonSettings = new JsonSerializerSettings()
TypeNameHandling = TypeNameHandling.All,
var serializedStr = JsonConvert.SerializeObject(c, Formatting.Indented, _jsonSettings);
Console.WriteLine("*************** Serialized JSON ***************************");
Console.WriteLine(serializedStr);
var deserializedStructure = JsonConvert.DeserializeObject<IMyInterface>(serializedStr, _jsonSettings);
Console.WriteLine("*************** Deserialized Checks ***********************");
public interface IMyInterface {
public class MyClass: IMyInterface