这个页面的目标,是让开发者先判断单一格式本身是否足够可用,再决定是否继续看某一条转换路径。
已展示格式
14
可作为 parser 输入
14
可作为 generator 输出
14
每一种格式都应该回答一个很实际的问题:它现在作为输入 parser、输出 generator,还是两者兼具,到底有多可信?
JSONJSON
Parser 很强、暂不支持 generator,最适合快速推断。
BetaParser 支持
✓已支持Generator 支持
✓已支持
JSON
Parser 很强、暂不支持 generator,最适合快速推断。
Parser 支持
✓已支持Generator 支持
✓已支持JSON 目前最适合作为轻量 source format,用来做 sample-driven inference 和快速探索。
当前表现较好的部分
适合快速接入 sample
适合探索式类型推断
可以顺畅进入 TypeScript inference
当前限制
在当前公开 Playground 流程里,JSON 还不是输出 target。
样例覆盖度完全取决于输入 payload 是否足够有代表性。
JSON inference is intentionally conservative and is not a universal schema inference engine.
Mixed-type handling depends on parser inference options rather than one always-on widening rule.
tuple-inference-modes
record-inference-modes
JSON SchemaJSON Schema
当前已具备双向支持,但复杂 schema 语义仍需谨慎审查。
BetaParser 支持
✓已支持Generator 支持
✓已支持
JSON Schema
当前已具备双向支持,但复杂 schema 语义仍需谨慎审查。
Parser 支持
✓已支持Generator 支持
✓已支持JSON Schema 已经是一条真实的双向集成 surface,但更复杂的 construct 仍需要结合 diagnostics 一起判断。
当前表现较好的部分
parser 和 generator 都已具备现实价值
适合作为交换契约格式
和当前 TypeScript 相关路径配合较好
当前限制
高度动态的 schema pattern 可能退化成更宽泛的输出。
部分语义仍需要通过 diagnostics 理解 loss。
JSON Schema support is limited to the current IR-aligned Draft 2020-12 subset.
Validation-heavy and document-system features such as external references remain unsupported.
Object-only allOf can be merged; references, non-object compositions, not, and conditional schemas remain outside the current JSON Schema parser subset.
constraint-round-trip-through-shared-ir
相关转换路径
OpenAPIOpenAPI
支持 API schema 的双向转换,解析时支持 component entry 选择。
BetaParser 支持
✓已支持Generator 支持
✓已支持
OpenAPI
支持 API schema 的双向转换,解析时支持 component entry 选择。
Parser 支持
✓已支持Generator 支持
✓已支持OpenAPI 当前定位为 schema-oriented parser 和 generator:读取 components.schemas,解析多个 schema 时支持 entry;不处理完整 API 文档。
当前表现较好的部分
解析 OpenAPI component schema
生成 schema-oriented OpenAPI 3.1 document
复用共享 Shape IR pipeline
当前限制
生成结果是 schema-oriented 的 OpenAPI 3.1 document,不会还原 paths 或 operations。
文档包含多个 component schema 时,parser 需要选择 entry。
paths、operations、parameters、security、callbacks、webhooks 和外部 references 暂不支持。
OpenAPI support is currently limited to extracting schemas from components.schemas rather than processing the full API document.
OpenAPI generation emits only a canonical 3.1 schema document and does not recreate source metadata or API operations.
Paths, operations, request and response bodies, parameters, headers, security, callbacks, and webhooks are outside the current parser boundary.
Only local references to components.schemas are supported; external and URL-based references are unsupported.
Object-only allOf compositions can be merged into shared IR; conflicting or non-object compositions remain unsupported.
full-document-processing
allOf-composition
相关转换路径
TypeScriptTypeScript
当前最强的建模入口,也最适合配合 JSON Schema 生成。
BetaParser 支持
✓已支持Generator 支持
✓已支持
TypeScript
当前最强的建模入口,也最适合配合 JSON Schema 生成。
Parser 支持
✓已支持Generator 支持
✓已支持TypeScript 目前是最清晰、最容易让开发者快速理解价值的一种 developer-facing source format。
当前表现较好的部分
当前最强的建模体验
适合查看 typed model
和 JSON Schema generation 配合最好
当前限制
更高级的 TypeScript 语义可能会收敛成更简单的下游结构。
generator 侧输出的精度仍受当前 schema 模型支持边界影响。
TypeScript support is limited to schema-oriented declarations rather than the full language.
Single-file parsing is the current boundary, so imported or cross-file type resolution is unsupported.
Function types, conditional types, mapped types, and intersection types are outside the current supported subset.
TypeScript generation widens integer semantics to number and does not preserve constraint families directly.
implicit-entry-selection
enum-lowering-within-schema-subset
相关转换路径
从格式概览出发,查看对应的 parser、generator 和转换路径,再进入共享 Playground 验证实际结果。