Detect Inspector ScriptableObject Dirty

What is the simplest way to detect if a ScriptableObject has been changed in the inspector. I need to run a JSON serializer whenever something changes. Being able to auto detect the change would be much easier than having a user click a save button.

Perhaps this will suit your needs? Unity - Scripting API: GUI.changed

for a more limited variant: Unity - Scripting API: EditorGUI.BeginChangeCheck

Obviously these wont detect changes you make in code, but they can detected changes made by the user, in Inspector controls.