Formateurs & Code
gRPC .proto ⇄ JSON Schema
Bridge protobuf and JSON Schema definitions.
Note de la rédaction
Understanding · Two schema languages — one for wire, one for validation.
Ce chapitre approfondi n'est actuellement disponible qu'en anglais. L'outil de conversion ci-dessus fonctionne dans votre langue ; le long article explicatif n'a pas encore été traduit.
Questions fréquentes
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.
Les internautes recherchent aussi
Outils similaires
More in this room.
- Validateur OpenAPI / SwaggerValidez les spécifications OpenAPI 3 par rapport aux règles de spécification.
- OpenAPI 3.1 YAML ⇄ JSONConvertissez les spécifications OpenAPI entre YAML et JSON.
- OpenAPI → Client Axios TypeScriptGénérez un client Axios typé à partir de n'importe quelle spécification OpenAPI.
- OpenAPI → Hooks React QueryHooks useQuery + useMutation auto-générés par endpoint.
- OpenAPI → Collection PostmanCollection Postman v2.1 à partir de n'importe quelle spécification OpenAPI.
- GraphQL SDL ⇄ Types TypeScriptParcourez un schéma, émettez des interfaces typées — et vice-versa.