pub fn json_formatter<T>(pretty: bool, value: &T) -> Stringwhere T: Serialize,
Formats a value as a JSON string.