pub fn output_items_from_value(value: Value) -> OutputItemsExpand description
Projects a canonical JSON value back into generic output items.
This is the inverse substrate bridge used by the canonical DSL: semantic payloads stay canonical as JSON, while the existing stage logic continues to operate over rows and groups derived from that JSON.
ยงExamples
use osp_cli::core::output_model::{OutputItems, output_items_from_value};
use serde_json::json;
let items = output_items_from_value(json!({"uid": "alice"}));
assert_eq!(
items,
OutputItems::Rows(vec![json!({"uid": "alice"}).as_object().cloned().unwrap()])
);