Function jsonutils::print::print_json

source ยท
pub fn print_json<T: Serialize>(value: T) -> Result<()>
Expand description

Pretty-print a serializable value as JSON.

use jsonutils::print::print_json;
use serde_json::json;

let json = json!({
   "name": "Alice",
   "age": 30,
   "is_student": false
});

print_json(json).unwrap();