Skip to main content

parse_with

Function parse_with 

Source
pub fn parse_with(src: &str, options: &ZonOptions) -> Result<Value, ZonError>
Expand description

Parse a ZON source string with the given options, on a dedicated instance built for the call: the Go Parse(src, opts). For many parses with the same options, build one parser with make_with.

let options = tabnas_zon::ZonOptions { char_as_number: true, ..Default::default() };
assert_eq!(tabnas_zon::parse_with("'\\n'", &options)?.to_string(), "10");