using System.ComponentModel;
using Newtonsoft.Json.Serialization;
public static void Main()
string json = @"{ ""StringProp"" : ""foo"" }";
Console.WriteLine("--- Deserialize ---");
MyClass mc = JsonConvert.DeserializeObject<MyClass>(json);
Console.WriteLine("StringProp: " + mc.StringProp);
Console.WriteLine("--- Manual change ---");
Console.WriteLine("--- Serialize ---");
json = JsonConvert.SerializeObject(mc);
public class MyClass : INotifyPropertyChanged
[JsonProperty("StringProp")]
if (_StringProp != value)
RaisePropertyChanged("StringProp");
public event PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
Console.WriteLine(propertyName + " was changed " + DateTime.Now);