LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

json5

parses JSON5 format and outputs standard JSON

TLDR

Parse JSON5 to JSON
$ json5 [file.json5]
copy
Convert from stdin
$ echo '{name: "test"}' | json5
copy
Pretty print
$ json5 --space [2] [file.json5]
copy
Validate only
$ json5 --validate [file.json5]
copy
Indent with tabs
$ json5 --space t [file.json5]
copy
Convert and write to file
$ json5 --out-file [output.json] [file.json5]
copy

SYNOPSIS

json5 [options] [file]

DESCRIPTION

json5 parses JSON5 format and outputs standard JSON. JSON5 extends JSON with comments, trailing commas, and unquoted keys.The tool converts more readable JSON5 configs to strict JSON. It validates and formats JSON5 input.

PARAMETERS

FILE

JSON5 file to parse. Reads from stdin if omitted.
-s, --space N
Number of spaces to indent, or "t" for tabs.
-v, --validate
Validate JSON5 syntax without outputting JSON.
-o, --out-file FILE
Write output to file instead of stdout.
-V, --version
Display version number.
-h, --help
Display help information.

INSTALL

brew install json5
copy

CAVEATS

Node.js tool. JSON5 is a superset of JSON. Output is standard JSON.

HISTORY

json5 implements the JSON5 specification, designed to make JSON more human-friendly for configuration files.

SEE ALSO

jq(1), json_pp(1), jsonlint(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid