Skip to main content

parse_input

Function parse_input 

Source
pub fn parse_input(
    text: &str,
    format: Format,
    path: Option<&Utf8Path>,
) -> Vec<Result<ParsedEntry, ParseError>>
Expand description

Parse text per format, dispatching to the matching shape parser. path is consulted only when format == Format::Auto to drive detect_format.

Returns one element per discovered entry — Ok for entries that produced a Ref, Err for per-entry failures the caller should surface as a JSONL INVALID_REF line. A whole-input decode failure (ParseError::Decode) is returned as a single-element Err so the caller’s exit-code path treats it as one parse error rather than zero.