OLD | NEW |
(Empty) | |
| 1 # protoc plugin for JSON converter |
| 2 |
| 3 These protoc plugins use a simple JSON encoding. |
| 4 |
| 5 An instance of the following protobuf: |
| 6 |
| 7 ``` |
| 8 message Foo { |
| 9 message Bar { |
| 10 repeated string rabbits = 1; |
| 11 } |
| 12 optional string cat = 1; |
| 13 repeated int32 dog = 2; |
| 14 optional Bar rabbit_den = 3; |
| 15 } |
| 16 ``` |
| 17 |
| 18 could be encoded to something like: |
| 19 |
| 20 ``` |
| 21 { |
| 22 "1": "kitty", |
| 23 "2": [4, 16, 9], |
| 24 "3": { "1": ["thumper", "oreo", "daisy"] } |
| 25 } |
| 26 ``` |
| 27 |
| 28 Only a limited part of the protocol buffer IDL is supported. |
| 29 |
| 30 * Supported field types: `float`, `double`, `int32`, `bool`, `string`, `messag
e`, and `enum` |
| 31 |
| 32 * Supported field rules: `optional`, `repeated` |
| 33 |
| 34 * Unsupported features: |
| 35 |
| 36 * default values |
| 37 * imports |
| 38 * extensions |
| 39 * services |
| 40 * non-file-level options |
OLD | NEW |