Json.NET supports serialization callback methods. A callback can be used to manipulate an object before and after its serialization and deserialization by the JsonSerializer. OnSerializing OnSerialized OnDeserializing OnDeserialized To tell the serializer which methods should be called during the object's serialization lifecycle, decorate a method with the appropriate attribute (T:System.Runtime.Serialization.OnSerializingAttribute, T:System.Runtime.Serialization.OnSerializedAttribute, T:System.Runtime.Serialization.OnDeserializingAttribute, T:System.Runtime.Serialization.OnDeserializedAttribute).
Example Example object with serialization callback methods: The example object being serialized and deserialized by Json.NET:
T:System.Runtime.Serialization.OnSerializingAttribute T:System.Runtime.Serialization.OnSerializedAttribute T:System.Runtime.Serialization.OnDeserializingAttribute T:System.Runtime.Serialization.OnDeserializedAttribute