Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here

Statistics on jackson-datatype-protobuf

Number of watchers on Github 38
Number of open issues 0
Average time to close an issue 23 days
Main language Java
Average time to merge a PR 3 days
Open pull requests 1+
Closed pull requests 5+
Last commit about 2 years ago
Repo Created over 6 years ago
Repo Last Updated over 2 years ago
Size 388 KB
Organization / Authorhubspot
Latest Releasejackson-datatype-protobuf-0.9.6-preJackson27
Page Updated
Do you use jackson-datatype-protobuf? Leave a review!
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating jackson-datatype-protobuf for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Jackson module that adds support for serializing and deserializing Google's Protocol Buffers to and from JSON.


Maven dependency

To use module on Maven-based projects, use following dependency:

  <version><!-- see table below --></version>


There are separate versions based on which version of Jackson you are using, as well as which version of protobuf (proto2 vs. proto3). The follow table shows which version to use based on these factors:

Jackson <= 2.6.x Jackson 2.7.x Jackson 2.8.x Jackson 2.9.x
Protobuf 2.x 0.9.9-preJackson2.7-proto2 0.9.9-jackson2.7-proto2 0.9.9-jackson2.8-proto2 0.9.9-jackson2.9-proto2
Protobuf 3.x 0.9.9-preJackson2.7-proto3 0.9.9-jackson2.7-proto3 0.9.9-jackson2.8-proto3 0.9.9-jackson2.9-proto3

Protobuf 3 Support

As noted above, if you are using Protobuf3 there is a separate version of the library to use. It has support for all of the Protobuf 3 features and built-in types. The JSON representation should match the encoding specified here, with a few exceptions:

  • int64, fixed64, uint64 are written as JSON numbers instead of strings
  • Any objects don't have any special handling, so the value will be a base64 string, and the type URL field name is typeUrl instead of @type

Compared to Protobuf2 behavior, the main difference is that field presence is only supported for Message fields. This means we can't tell if a primitive field was explicitly set to its default value, or not set at all. So for Protobuf3 messages, the library will write primitive fields that are set to default values. If you want to disable this, you can set your JSON inclusion to Include.NON_DEFAULT. Currently you need to set this inclusion globally, but we could make it more granular in the future.

Registering module

Registration is done as follows:

ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new ProtobufModule());

after which functionality is available for all normal Jackson operations.

jackson-datatype-protobuf open issues Ask a question     (View All Issues)
  • almost 4 years protocol buffer maps are serialized as key-value lists
  • almost 4 years Booleans and enums represented as 0 show up as null in JSON
  • over 4 years Extension Fields are missing in json representation
jackson-datatype-protobuf open pull requests (View All Pulls)
  • Add ProtobufClassIntrospector
jackson-datatype-protobuf list of languages used
Other projects in Java