MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / print_json

Function print_json

atomic-cli/src/commands/diff/json.rs:225–230  ·  view source on GitHub ↗

Print the document to stdout.

(document: &JsonDiff)

Source from the content-addressed store, hash-verified

223
224/// Print the document to stdout.
225pub(super) fn print_json(document: &JsonDiff) -> CliResult<()> {
226 let rendered =
227 serde_json::to_string_pretty(document).map_err(|e| CliError::Internal(e.into()))?;
228 println!("{rendered}");
229 Ok(())
230}
231
232#[cfg(test)]
233mod tests {

Callers 3

renderMethod · 0.70
print_no_changesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected