pub fn parse_to_value<'a>(
text: &'a str,
options: &ParseOptions,
) -> Result<Option<JsonValue<'a>>, ParseError>
Expand description
Parses a string containing JSONC to a JsonValue
.
ยงExample
use jsonc_parser::parse_to_value;
let json_value = parse_to_value(r#"{ "test": 5 } // test"#, &Default::default()).expect("Should parse.");