I am using Json.NET to serialize a graph of objects. For each object that is serialized or deserialized, I want to call a method on that object before serialization occurs. E.g. all my objects implement the INotified interface using the OnSerializing method. I want OnSerializing to be called before the object is serialized.
Is there a way to achieve this without touching the Json.NET source code?
source
share