Explicitly serialize definition as JSON