LinuxCommandLibrary

jc.json

parses and validates JSON input

TLDR

Parse generic JSON

$ cat [file.json] | jc --json
copy
Validate JSON
$ jc --json < [file.json]
copy
Parse with pretty output
$ jc --json -p < [file.json]
copy
Parse JSON Lines
$ jc --jsonl < [file.jsonl]
copy

SYNOPSIS

jc --json [options]

DESCRIPTION

jc --json parses and validates JSON input. It's the JSON passthrough parser in jc for format validation and normalization.
The parser accepts JSON from stdin and outputs formatted JSON. Useful for validating or reformatting JSON data.

PARAMETERS

--json

Parse JSON input.
--jsonl
Parse JSON Lines format.
-p, --pretty
Pretty print output.
-r, --raw
Raw output mode.
--help
Display help information.

CAVEATS

Part of jc toolkit. JSON passthrough parser. Mostly for validation/formatting.

HISTORY

The JSON parser was added to jc to provide a complete set of parsers including JSON input handling.

SEE ALSO

jc(1), jq(1), jsonlint(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community