pub fn parse_to_serde_value(
text: &str,
parse_options: &ParseOptions,
) -> Result<Option<Value>, ParseError>
Expand description
Parses a string containing JSONC to a `serde_json::Value.
Requires the “serde” cargo feature:
jsonc-parser = { version = "...", features = ["serde"] }
§Example
use jsonc_parser::parse_to_serde_value;
let json_value = parse_to_serde_value(r#"{ "test": 5 } // test"#, &Default::default()).unwrap();