pub fn parse(
source: &str,
options: &ParseOptions,
provider: &dyn DeclProvider,
) -> Result<Value, ParserError>Expand description
parse a structom file into a Value.
the source is made up of optional declerations at top, followed by a root value.
it takes parsing options and a decleration provider used to resolve imports.
for info on how the values are represented, see the Value documentation.
ยงexample
let value = parse(
"{ nb: 1, str: \"hello\", bool: true, arr: [1, 2, 3] }", &ParseOptions::default(), &VoidProvider{}
).unwrap();