Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
|
nyquist
2016/06/14 00:48:11
Nit: 2016
wychen
2016/08/07 09:16:27
Done.
| |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 These protoc plugins use a simple json encoding. | |
| 6 | |
| 7 An instance of the following protobuf: | |
| 8 | |
| 9 message Foo { | |
|
nyquist
2016/06/14 00:48:11
Would it be easier to read this in markdown format
wychen
2016/08/07 09:16:27
Done.
| |
| 10 message Bar { | |
| 11 repeated string rabbits = 1; | |
| 12 } | |
| 13 optional string cat = 1; | |
| 14 repeated int32 dog = 2; | |
| 15 optional Bar rabbit_den = 3; | |
| 16 } | |
| 17 | |
| 18 could be encoded something like: | |
| 19 | |
| 20 { | |
| 21 "1": "kitty", | |
| 22 "2": [4, 16, 9], | |
| 23 "3": { "1": ["thumper", "oreo", "daisy"] } | |
| 24 } | |
| 25 | |
| 26 | |
| 27 Only a limited part of the protocol buffer IDL is supported. | |
| 28 | |
| 29 Supported field types: | |
| 30 float, double, int32, bool, string, message, and enum | |
| 31 | |
| 32 Supported field rules: | |
| 33 optional, repeated | |
| 34 | |
| 35 Unsupported features: | |
| 36 default values | |
| 37 imports | |
| 38 extensions | |
| 39 services | |
| 40 non-file-level options | |
| 41 | |
| OLD | NEW |