Skip to main content

json

Function json 

Source
pub fn json(parser: &mut Tabnas) -> Result<(), GrammarError>
Expand description

Install the strict JSON options and the JSON rule set on parser.

This is the one entry point: make goes through it too, so the two construction paths cannot drift apart.

let mut parser = tabnas::Tabnas::new();
tabnas_json::json(&mut parser)?;
let value = parser.parse("[1,2,3]")?;
assert_eq!(value.to_string(), "[1,2,3]");