Skip to main content

parse_json

Function parse_json 

Source
pub fn parse_json<T: DeserializeOwned>(
    contents: &str,
    path: &Path,
) -> CommandResult<T>
Expand description

Parse contents as JSON, producing a message that names path on failure. Split out from read_json_or_default so parse failures can be tested without touching the filesystem.