← 返回
未分类 中文

Jsonpretty

Format, validate, query, flatten, and analyze JSON data. Use when asked to pretty-print JSON, validate JSON syntax, query nested JSON with dot-notation, flat...
格式、校验、查询、扁平化和分析 JSON 数据。用于美化 JSON、校验 JSON 语法、使用点号查询嵌套结构、展开嵌套或统计 JSON 数据等需求。
rogue-agent1 rogue-agent1 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 405
下载
💾 1
安装
1
版本
#latest

概述

jsonpretty 📋

JSON swiss army knife — format, validate, query, flatten, stats.

Commands

# Pretty-print (from file or stdin)
python3 scripts/jsonpretty.py data.json
echo '{"a":1}' | python3 scripts/jsonpretty.py

# Validate JSON
python3 scripts/jsonpretty.py --validate data.json

# Query with dot-notation
echo '{"user":{"name":"Rogue"}}' | python3 scripts/jsonpretty.py -q "user.name"

# Flatten nested JSON
cat data.json | python3 scripts/jsonpretty.py --flat

# Structure stats (key count, depth, types, size)
python3 scripts/jsonpretty.py --stats data.json

# Compact output (minify)
python3 scripts/jsonpretty.py --compact data.json

# Sort keys
python3 scripts/jsonpretty.py --sort data.json

Features

  • Pretty-print with 2-space indent (default)
  • JSON validation with error messages
  • Dot-notation querying (supports array indices: key[0].sub)
  • Flatten nested objects to key.subkey = value pairs
  • Structure statistics: key count, nesting depth, type distribution, byte size
  • Compact/minify mode
  • Sorted key output
  • Reads from file or stdin

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 10:26 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,398
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 201 📥 68,573
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 689 📥 332,743