leo json
本页由 Cobra 命令树生成;命令、参数和输出保持 CLI 原文。
leo json
Section titled “leo json”Repair and format JSON, escaped JSON, or Python dicts
Synopsis
Section titled “Synopsis”Repair JSON-like payloads and print standard JSON.
Input is taken from PAYLOAD, piped stdin, or the clipboard, in that order. Handles single quotes, Python True/False/None, comments, missing punctuation, truncated JSON, Markdown code fences, log prefixes, and nested string encoding. Only top-level encoded payloads are unwrapped; object field strings stay strings. On a terminal, select JSON strings to parse deeper in an interactive viewer. Piped output, –plain, and –compact print JSON directly; –interactive forces the viewer. Repair is heuristic and does not execute Python or JavaScript code.
leo json [PAYLOAD] [flags]Examples
Section titled “Examples” leo json leo json "{'name': 'Leo', 'active': True, 'value': None}" cat payload.txt | leo json leo json --copy leo json --compact leo json --plain leo json --interactive > expanded.jsonOptions
Section titled “Options” -c, --compact Print JSON on one line --copy Also copy the result to the clipboard -h, --help help for json -i, --interactive Open the viewer even when stdout is redirected --plain Print JSON without the interactive viewerOptions inherited from parent commands
Section titled “Options inherited from parent commands” -v, --version Print versionSEE ALSO
Section titled “SEE ALSO”- leo - Personal command-line tools