← 返回
未分类 中文

Json Schema Toolkit

Validate JSON data against JSON Schema, generate schemas from sample JSON, and convert schemas to TypeScript interfaces, Python dataclasses, or Markdown docs...
使用 JSON Schema 验证 JSON 数据,从示例 JSON 生成 schema,并将其转换为 TypeScript 接口、Python 数据类或 Markdown 文档。
johnnywang2001 johnnywang2001 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 429
下载
💾 0
安装
1
版本
#latest

概述

JSON Schema Toolkit

Validate, generate, and convert JSON Schemas with zero dependencies.

Commands

All commands use scripts/json_schema.py.

Generate Schema from Sample Data

python3 scripts/json_schema.py generate --input sample.json
python3 scripts/json_schema.py generate --input sample.json --output schema.json
echo '{"name":"Jo","age":25}' | python3 scripts/json_schema.py generate --input -

Auto-detects string formats (email, date-time, date, uri, ipv4).

Validate JSON Against Schema

python3 scripts/json_schema.py validate --schema schema.json --data data.json

Reports all validation errors with JSON paths. Exit code 1 on failure.

Convert Schema to Code

python3 scripts/json_schema.py convert --input schema.json --format typescript
python3 scripts/json_schema.py convert --input schema.json --format python-dataclass
python3 scripts/json_schema.py convert --input schema.json --format markdown --name User

Supported formats: typescript, python-dataclass, markdown.

Supported Validation Keywords

type, enum, required, properties, additionalProperties, items, minLength, maxLength, pattern, minimum, maximum, minItems, maxItems, format.

Stdin Support

Use --input - to pipe JSON from stdin for both generate and validate --data.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 21:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 328,737
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 74 📥 182,243
business-ops

Agent Invoice Generator

johnnywang2001
根据自然语言或结构化数据生成专业的PDF发票,适用于用户请求创建发票、向客户计费或生成收据等场景。
★ 0 📥 738