Difference between revisions of "Protobuf notes"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
m  | 
				m  | 
				||
| Line 27: | Line 27: | ||
}  | }  | ||
</pre>  | </pre>  | ||
| + | |||
| + | . . . It appears that the integer values which message elements are assigned as tantamount to key names in JSON.  | ||
| + | |||
| + | |||
| + | |||
| + | <!-- comentario -->  | ||
Revision as of 15:26, 27 December 2021
Protobuf references, somewhat arbitrary starting point yet introduces some key topics of Protobuf standard and use cases:
- https://www.crankuptheamps.com/blog/posts/2017/10/12/protobuf-battle-of-the-syntaxes/
 - https://www.educative.io/edpresso/what-is-the-difference-between-protocol-buffers-and-json
 
JSON supported data types:
First Protobuf .proto file, compiles using `protoc-c`, part of a package available with Ubuntu 20.04:
// syntax = "proto3";
syntax = "proto2";
// Notes:
// $ protoc-c --c_out=. ./first.proto
message sensorUpdates {
  required int32 message_id = 1;
  optional float vrms = 2;
}
. . . It appears that the integer values which message elements are assigned as tantamount to key names in JSON.