pub fn values(input: &str) -> Result<Vec<Value>>Available on crate feature
parallel only.Expand description
Dynamic-tree variant of parse: returns a
Vec<crate::Value>. Use when the caller wants to route
documents to different typed handlers post-parse.
ยงExamples
use noyalib::Value;
let yaml = "---\na: 1\n---\nb: 2\n";
let docs: Vec<Value> = noyalib::parallel::values(yaml).unwrap();
assert_eq!(docs.len(), 2);
assert_eq!(docs[0]["a"].as_i64(), Some(1));
assert_eq!(docs[1]["b"].as_i64(), Some(2));