360 Secure SkillHub
360 安全技能中心

Jsonlint

这是基于Python3的终端JSON工具集,核心功能含语法校验、格式化美化、压缩、深度对比文件、列顶级键、按路径提取嵌套值。适用于配置文件检查、API响应格式化、部署前压缩、版本对比等场景,通过终端命令调用,输出直观的结果信息。

bytesagain3
bytesagain3
热度 68.76
最近更新 2026-05-11 17:31:53
分类:开发依赖:代码执行 / 读写文件应用场景:数据处理 / 文件转换 / 调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add jsonlint
Metadata
name
JSONLint
description
Validate and pretty-print JSON files from the terminal. Use when linting config files, formatting API payloads, checking syntax before deployment.
version
3.0.0
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
tags
["json","validator","formatter","lint","pretty-print","minify","developer","data"]
categories
["Developer Tools","Utility"]

JSONLint

A real JSON linter and toolkit for the terminal. Validate syntax, pretty-print, minify, compare files, list keys, and extract values by path — all powered by python3.

Commands

Command Description
jsonlint validate <file> Check JSON syntax — reports type, element count, file size, and shows error context on failure
jsonlint format <file> Pretty-print JSON with 4-space indentation
jsonlint minify <file> Compact JSON (remove all whitespace), shows bytes saved
jsonlint diff <file1> <file2> Deep structural comparison of two JSON files — shows added, removed, and changed values with dot-paths
jsonlint keys <file> List all top-level keys with types and value previews
jsonlint extract <file> <path> Extract a value by dot-path (e.g. config.database.host), supports array indices like items[0]

Requirements

  • python3 (uses json stdlib module)

Examples

# Validate a config file
jsonlint validate config.json

# Pretty-print API response
jsonlint format response.json

# Minify for deployment
jsonlint minify package.json

# Compare two versions
jsonlint diff old.json new.json

# List what's in a JSON file
jsonlint keys data.json

# Dig into nested values
jsonlint extract config.json database.host