格式化与代码
gRPC .proto ⇄ JSON Schema
Bridge protobuf and JSON Schema definitions.
编辑注
Understanding · Two schema languages — one for wire, one for validation.
本深度章节目前仅有英文版本。上方的转换工具支持您的语言;长篇说明文章尚未翻译。
常见问题
Quick answers.
›How are protobuf types mapped to JSON Schema?
The converter follows standard proto3 mapping conventions. For example, `string` and `bytes` become `string` types in JSON Schema, while numeric types like `int32` are mapped to `number` or `integer` with range constraints.
›Is my API schema sent to a server?
No. The parsing and transformation logic is executed locally using JavaScript in your browser, keeping your protobuf definitions confidential.
›Can I convert from JSON Schema back to .proto?
Yes, the tool is bidirectional. You can paste a JSON Schema to generate equivalent protobuf message definitions, though documentation tags and specific gRPC service options may require manual adjustment.
›Does it support nested messages and enums?
Yes. The tool recursively processes nested messages, enums, and `oneof` fields into their corresponding `definitions` or `anyOf` representations in JSON Schema.
大家也在搜索
相关工具
More in this room.
- OpenAPI / Swagger 验证器根据规范规则验证 OpenAPI 3 规范。
- OpenAPI 3.1 YAML ⇄ JSON在 YAML 和 JSON 之间转换 OpenAPI 规范。
- OpenAPI → TypeScript Axios 客户端从任何 OpenAPI 规范生成类型化的 Axios 客户端。
- OpenAPI → React Query Hooks为每个端点自动生成 useQuery + useMutation hook。
- OpenAPI → Postman Collection从任何 OpenAPI 规范生成 Postman v2.1 collection。
- GraphQL SDL ⇄ TypeScript 类型遍历 schema,发出类型化接口,然后反向操作。