pub fn optional_str<'a>(
input: &'a Value,
field: &str,
) -> Result<Option<&'a str>, ToolError>Expand description
Helper to extract an optional string field from JSON input.
A wrong type is an error, never a silent None. See type_mismatch
for why nothing is coerced.