This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.Data is in name-value pairs. | |
| "name": "john Gupta" | |
| 2. Commas always separate data. | |
| "name": "john Gupta", "age": 12 | |
| 3. Curly braces always hold the objects. | |
| { "name" : "john Gupta" , "age" : 12 } | |
| 4. Square brackets always hold an array. | |
| employees":[ | |
| { "firstName":" John", "Lastname":" Gupta" }, | |
| { "firstName":"Anna", "last name:"Shrivastava" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //This message contain all the information related employee | |
| message Employee{ | |
| //name will be the name of an employee | |
| string name = 1; | |
| //id is the unique id for each employee | |
| int32 id = 2; | |
| string email = 3; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //syntax proto3 will tell the compiler that we are using 3rd version | |
| //of protocol buffers. | |
| syntax = "proto3"; | |
| message Employee{ | |
| string name = 1; | |
| int32 id = 2; | |
| string email = 3; | |
| } | |
NewerOlder