public int Key { get; set; } = 10;
private void LoadDefaults() {
public static void Main()
var mc = new MyClass(){Key = 2};
var json = JsonConvert.SerializeObject(mc);
Console.WriteLine("JSON is: " + json);
Console.WriteLine("Serialized Key is: " + mc.Key);
var textStream = new MemoryStream(Encoding.Unicode.GetBytes(json));
MyClass output = JsonConvert.DeserializeObject<MyClass>(json);
Console.WriteLine("De-serialized Key is: " + output.Key);
JsonConvert.PopulateObject(json, mc2);
Console.WriteLine("Populated object Key is: " + mc2.Key);