Skip to main content

parse_json

Function parse_json 

Source
pub fn parse_json(
    arguments: &[String],
    program: &str,
    supported: &[String],
) -> String
Expand description

Parse arguments (excluding argv0) for native-compatible adapters.

supported contains canonical command names; empty enables every command. Aliases follow their canonical command. Unsupported commands are absent from help and rejected. Success contains {exit_code, command, args, notes}: args.quiet is the global -q, and notes holds the retired_note of each retired spelling used. args has native snake_case field names, flattened Args groups, canonical enum strings, string paths, defaults and null optional fields. Nested subcommands use {command, args}. Compare inputs include resolved named-over-positional values; compare’s output path stays null (the host picks it), while the author is Jubarte (D12) and the date now (D17), as for the binary. edit and add carry where they write, resolved: output for the one document or out_dir for the bundle, both null while recording into a plan. Informational/error results contain {exit_code, stream, text}. This function performs no document, filesystem, network or process I/O.