Skip to main content

parse

Function parse 

Source
pub fn parse(input: &str) -> (Option<JsonNode>, Vec<Diagnostic>)
Expand description

Tolerant parsing: Fails entirely if the JSON is invalid. Returns the parsed tree or a list of diagnostic errors. Primarily used for final validation.

§Arguments

  • input - The raw JSON string slice to parse.

§Returns

  • Some(JsonNode) - The parsed JSON abstract syntax tree (AST) on successful parse.
  • Err(Vec<Diagnostic>) - A list of syntax or structural errors found during parsing.