Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: third_party/dom_distiller_js/protoc_plugins/README.md

Issue 2034373002: Generate the proto JSON converter for DOM distiller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows-specific fixes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/dom_distiller_js/protoc_plugins/README.md
diff --git a/third_party/dom_distiller_js/protoc_plugins/README.md b/third_party/dom_distiller_js/protoc_plugins/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..8c788c16c129b6937d13670d71130936ee908283
--- /dev/null
+++ b/third_party/dom_distiller_js/protoc_plugins/README.md
@@ -0,0 +1,40 @@
+# protoc plugin for JSON converter
+
+These protoc plugins use a simple JSON encoding.
+
+An instance of the following protobuf:
+
+```
+message Foo {
+ message Bar {
+ repeated string rabbits = 1;
+ }
+ optional string cat = 1;
+ repeated int32 dog = 2;
+ optional Bar rabbit_den = 3;
+}
+```
+
+could be encoded to something like:
+
+```
+{
+ "1": "kitty",
+ "2": [4, 16, 9],
+ "3": { "1": ["thumper", "oreo", "daisy"] }
+}
+```
+
+Only a limited part of the protocol buffer IDL is supported.
+
+* Supported field types: `float`, `double`, `int32`, `bool`, `string`, `message`, and `enum`
+
+* Supported field rules: `optional`, `repeated`
+
+* Unsupported features:
+
+ * default values
+ * imports
+ * extensions
+ * services
+ * non-file-level options
« no previous file with comments | « third_party/dom_distiller_js/README.chromium ('k') | third_party/dom_distiller_js/protoc_plugins/json_values_converter.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698