Function jsonc_parser::parse_to_value
source · [−]pub fn parse_to_value(text: &str) -> Result<Option<JsonValue<'_>>, 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"#).expect("Should parse.");