bmctools.cli.formatters.json
JSON output formatter.
format_json
def format_json(data: Any, pretty: bool = False) -> strFormat data as JSON.
Args: data: Data to format (must be JSON-serializable) pretty: If True, use indentation and sort keys
Returns: JSON string
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
data | Any | — | |
pretty | bool | False |
Returns: str