Using Protobuf Without Serialize/Deserialize Part

108 views
Skip to first unread message

Kaveh Shahbazian

unread,
Mar 10, 2021, 11:19:51 PM3/10/21
to Protocol Buffers

Is it possible to use protobuf for generating only the data structure in multiple languages, without the serialization utilities?

This is useful in scenarios that, multiple programming languages are used in different parts of the system. The serialization could be (usually) JSON or something else. And the data structures are POJO/POCO/POGO/etc.

Point is, the protobuf IDL itself, seems to be a superb tool for implementing a consistent contract between different parts of the system.

Adam Cozzette

unread,
Mar 11, 2021, 12:08:53 PM3/11/21
to Kaveh Shahbazian, Protocol Buffers
You could certainly do this, but I don't think the generated types meet the technical definition of POJO, etc. For example, in C++ the types are not technically POD (plain old data). That doesn't sound like it would be a problem, though. It sounds like you plan to just use protobuf JSON serialization instead of the binary serialization, which will work just fine.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/e3245293-5b60-4a4e-b9d6-baaa30751b40n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages