Man page - pyjson5(1)

Packages contains this manual

Manual

PYJSON5

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
positional arguments:
options:
EXAMPLES

NAME

pyjson5 - formatter for JSON5 documents

SYNOPSIS

json5 [-h] [-V] [-c STR] [--as-json] [--indent INDENT] [--quote-keys][--no-quote-keys] [--trailing-commas] [--no-trailing-commas][FILE]

DESCRIPTION

A tool to parse and pretty-print JSON5.

OPTIONS

positional arguments:

FILE

optional file to read JSON5 document from; if not specified or "-", will read from stdin instead

options:

-h , --help

show this help message and exit

-V , --version

print the version and exit

-c STR

inline json5 string to read instead of reading from a file

--as-json

output as JSON (same as --quote-keys --no-trailingcommas )

--indent INDENT

amount to indent each line (default is 4 spaces)

--quote-keys

quote all object keys

--no-quote-keys

don’t quote object keys that are identifiers (this is the default)

--trailing-commas

add commas after the last item in multi-line objects and arrays (this is the default)

--no-trailing-commas

do not add commas after the last item in multi-line lists and objects

EXAMPLES

$ echo ’{foo:"bar"}’ | pyjson5

{

foo: ’bar’,

}

$ echo ’{foo:"bar"}’ | pyjson5 --as-json

{

"foo": "bar"

}