Skip to main content

parse

Function parse 

Source
pub fn parse(
    source: &str,
    options: &ParseOptions,
    provider: &dyn DeclProvider,
) -> Result<Value, ParseError>
Expand description

parse structom object notation into a Value.

the source is made up of optional declerations at top, followed by a root value.

returns ParseError if the source is invalid.

for the other way see stringify

ยงexample

let value = parse(
	"{ nb: 1, str: \"hello\", bool: true, arr: [1, 2, 3] }", &ParseOptions::default(), &VoidProvider{}
).unwrap();