Crate structured_output
source ·Expand description
A library for creating structured output for command line applications.
Example
use structured_output::StructuredOutput;
let lines = "Hello world!";
let json = serde_json::json!({ "message": lines });
let output = StructuredOutput::new(lines, json.clone());
assert_eq!(output.lines(), "Hello world!");
assert_eq!(output.json(), &json);
Structs
- A struct that contains both a string and a json value.