pub trait Validator { // Required method fn validate(&self, name: &str, value: &JSONValue) -> Result<(), String>; // Provided method fn transform(&self, _: &str, value: &JSONValue) -> Result<JSONValue, String> { ... } }