PYJSON5(1)

πŸ“¦ version 0.10.0, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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