← 返回命令列表

Linux command

jc.json 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Parse generic JSON

cat [file.json] | jc --json

Validate JSON

jc --json < [file.json]

Parse with pretty output

jc --json -p < [file.json]

Parse JSON Lines

jc --jsonl < [file.jsonl]

说明

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.

参数

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

FAQ

What is the jc.json command used for?

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.

How do I run a basic jc.json example?

Run `cat [file.json] | jc --json` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --json do in jc.json?

Parse JSON input.