pub fn json_pretty<T: Serialize>(t: &T) -> Result<String, ErrorInfo>