MCPcopy Create free account
hub / github.com/bootc-dev/bootc / run_and_parse_json

Method run_and_parse_json

crates/utils/src/command.rs:186–189  ·  view source on GitHub ↗

Synchronously execute the child, and parse its stdout as JSON.

(&mut self)

Source from the content-addressed store, hash-verified

184
185 /// Synchronously execute the child, and parse its stdout as JSON.
186 fn run_and_parse_json<T: serde::de::DeserializeOwned>(&mut self) -> Result<T> {
187 let output = self.run_get_output()?;
188 serde_json::from_reader(output).map_err(Into::into)
189 }
190
191 fn run_inherited_with_cmd_context(&mut self) -> Result<()> {
192 self.status()?

Callers 7

command_run_ext_jsonFunction · 0.80
run_findmntFunction · 0.80
imageid_to_digestFunction · 0.80
loginctl_run_compatFunction · 0.80
parse_volumesFunction · 0.80
list_parentsMethod · 0.80
list_devFunction · 0.80

Calls 1

run_get_outputMethod · 0.80

Tested by 1

command_run_ext_jsonFunction · 0.64