pub fn parse(source: &str) -> Parse
Expand description

Parse a JSONA document into a Rowan green tree.

The parsing will not stop at unexpected or invalid tokens. Instead errors will be collected with their character offsets and lengths, and the invalid token(s) will have the ERROR kind in the final tree.

The parser will also validate comment and string contents, looking for invalid escape sequences and invalid characters. These will also be reported as syntax errors.

This does not check for semantic errors such as duplicate keys.