Sign in
apache
/
doris-cli
/
refs/heads/main
/
.
/
src
/
output
/
json.rs
blob: d1daffa376e40c498ff7d6443840ebef403aee36 [
file
]
use
serde_json
::
Value
;
/// Render a JSON value as pretty-printed JSON to stdout.
pub
fn
render
(
value
:
&
Value
)
->
anyhow
::
Result
<()>
{
let
output
=
serde_json
::
to_string_pretty
(
value
)?;
println
!(
"{output}"
);
Ok
(())
}