Crate json_cli

Source
Expand description

Helpers for creating CLIs with serializable JSON output.

This package is largely based on code from Aptos CLI.

Traits§

CliTool
A common trait for all CLI commands to have consistent outputs

Functions§

to_common_result
For pretty printing outputs in JSON
to_common_success_result
Convert any successful response to Success

Type Aliases§

CliResult
A common result to be returned to users
CliTypedResult
A common result to remove need for typing Result<T, CliError>