pub fn to_json_string<T: Serialize + ?Sized>( data: &T, context: &str, ) -> Result<String>
Generic JSON serialization with consistent error handling Works with any type that implements Serialize (including slices)