Clean JSON Toolkit
/install clean-json-toolkit
clean-json-toolkit
v0.1.0
Fourth member of the clean-* family. csv handles structured tabular data, text handles unstructured strings, log handles timestamped logs, and json handles nested data — API responses, config files, JSONL event streams.
Pure Python 3 standard library. No jq, no jsonschema, no pip installs.
Scripts
scripts/inspect.py— profile a.jsonor.jsonlfile: tree of every distinct path with types, counts, and N sample values per path.scripts/query.py— jq-style path queries..key.nested,.key[0],.[]iterate,.key.[].fieldmap. Output modes:--json/--jsonl/--lines/--raw. JSONL inputs implicitly iterate at the top level.scripts/flatten.py— flatten nested JSON into dot-notation keys. Reversible with--unflatten. Roundtrip-safe.scripts/validate.py— validate against a small schema (required,type,min/max,min_length/max_length,enum,regex,item_type,allow_extra).scripts/check_deps.sh— verifypython3.
Quick start
# Inspect
python3 scripts/inspect.py response.json
python3 scripts/inspect.py events.jsonl --max-samples 5
# Query
python3 scripts/query.py data.json '.meta'
python3 scripts/query.py data.json '.users.[].email' --raw
python3 scripts/query.py events.jsonl '.amount' --lines
# Flatten + unflatten roundtrip
python3 scripts/flatten.py config.json flat.json
python3 scripts/flatten.py flat.json nested.json --unflatten
# Validate
python3 scripts/validate.py users.jsonl --schema schema.json
Exit codes
| Code | Meaning |
|---|---|
| 0 | success / one or more results |
| 1 | zero results / validation failed / empty input |
| 2 | bad arguments / unsafe path / missing file / invalid JSON / bad schema |
Safety
- Pure Python 3 stdlib. No
eval, nosubprocess, no remote calls. - All paths validated against safe-path policy (same as the other
clean-*toolkits). - Hand-rolled query path tokenizer.
Pairs well with
License
MIT
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clean-json-toolkit - 安装完成后,直接呼叫该 Skill 的名称或使用
/clean-json-toolkit触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Clean JSON Toolkit 是什么?
Local JSON / JSONL inspection and manipulation toolkit. Inspect deeply nested structures (path tree, types, sample values per path), query with a jq-style pa... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 0 次。
如何安装 Clean JSON Toolkit?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clean-json-toolkit」即可一键安装,无需额外配置。
Clean JSON Toolkit 是免费的吗?
是的,Clean JSON Toolkit 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Clean JSON Toolkit 支持哪些平台?
Clean JSON Toolkit 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Clean JSON Toolkit?
由 gopendrasharma89-tech(@gopendrasharma89-tech)开发并维护,当前版本 v0.1.0。