PYJSON5(1)
π PYJSON5(1) β the manual page, but make it cute π
okay bestie, welcome to the PYJSON5(1) era of your life. this is the manual for pyjson5, and yes it's giving "tiny tool, huge slay". let's go. π¦
β¨ NAME β¨
pyjson5 β a formatter for JSON5 documents. that's it. that's the whole job. she formats. she serves. π
πΈ SYNOPSIS πΈ
json5 [-h] [-V] [-c STR] [--as-json] [--indent INDENT]
[--quote-keys][--no-quote-keys] [--trailing-commas]
[--no-trailing-commas][FILE]
π DESCRIPTION π
so basically: this is a tool that parses a JSON5 document and then pretty-prints it. read it in, make it gorgeous, spit it back out. that's the whole vibe. β¨
π OPTIONS π
π positional arguments:
FILEβ an optional file to read the JSON5 document from. if you don't give one, or if you literally just pass"-", she reads from stdin instead. no cap.
π«Ά options:
-h,--helpβ shows this help message and then dips. bye bestie π-V,--versionβ prints the version and exits. short and iconic.-c STRβ an inline json5 string to read instead of reading from a file. yes, straight from your little command line, no file needed π--as-jsonβ output as JSON. this is exactly the same as doing--quote-keys --no-trailingcommas. two flags in a trench coat fr fr π§₯--indent INDENTβ how much to indent each line. the default is 4 spaces. yes, four. she likes her personal space.--quote-keysβ quote all object keys. every single one. no exceptions π--no-quote-keysβ don't quote object keys that are identifiers. and guess what β this is the default. she's chill like that.--trailing-commasβ adds commas after the last item in multi-line objects and arrays. also the default. we love a comma that stays for the plot.--no-trailing-commasβ do not add commas after the last item in multi-line lists and objects. strict. minimalist. periodt.
π EXAMPLES π
here's her in action, bestie:
$ echo '{foo:"bar"}' | pyjson5
{
foo: 'bar',
}
and now with the JSON glow-up:
$ echo '{foo:"bar"}' | pyjson5 --as-json
{
"foo": "bar"
}
β that's the whole page β
you did it! you read the whole PYJSON5(1) manual. genuinely so proud of you. π₯Ή this is pyjson5, from April 2024, and it lives right here under PYJSON5(1) forever and ever. now go format something gorgeous. mwah. ππ
π¦ where this page comes from
- debian trixie: python3-json5 0.10.0-1 Β· Apache-2.0
- ubuntu resolute: python3-json5 0.10.0-1 Β· Apache-2.0
- ubuntu stonking: python3-json5 0.10.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms