Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-cloned / node_modules / protobufjs / examples / protoify / README.md
1 ProtoBuf.js protoify example\r
2 ============================\r
3 This example shows the general usage of ProtoBuf.js by converting JSON structures to protocol buffers and vice versa\r
4 using a definition describing JSON itself. While this works as an example, it does not provide any real world benefits\r
5 (well, this is if you are not building a protobuf-backed database for JSON data, using inter-field substitution to\r
6 minimize redundancy - nevermind, forget that).\r
7 \r
8 Instructions\r
9 ------------\r
10 1. Set up dependencies: `npm install`\r
11 2. Run: `npm test`\r
12 \r
13 Now you know no more and no less than that it works and you might want to inspect the following files to get the 'how':\r
14 \r
15 * **[index.js](https://github.com/dcodeIO/ProtoBuf.js/blob/master/examples/protoify/index.js)**\r
16   contains the sample's source code\r
17 \r
18 * **[json.proto](https://github.com/dcodeIO/ProtoBuf.js/blob/master/examples/protoify/json.proto)**\r
19   contains the protobuf definition used\r
20 \r
21 * **[json.json](https://github.com/dcodeIO/ProtoBuf.js/blob/master/examples/protoify/json.json)**\r
22   contains the protobuf definition converted through `proto2js json.proto > json.json`\r
23 \r
24 * **[json.js](https://github.com/dcodeIO/ProtoBuf.js/blob/master/examples/protoify/json.js)**\r
25   contains the protobuf definition converted through `proto2js json.proto -commonjs=js > json.js`\r
26 \r
27 * **[test.js](https://github.com/dcodeIO/ProtoBuf.js/blob/master/examples/protoify/test.js)**\r
28   contains our simple test suite\r