Google Protobuf vs JSON vs [insert candidate here]

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • json

    JSON for Modern C++

  • Would you rather use Google's Protocol Buffers or JSON+a library such as this one ? Or something else?

  • cereal

    A C++11 library for serialization

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Cap'n Proto

    Cap'n Proto serialization/RPC system - core tools and C++ library

  • You want Cap'n Proto, the successor to Protobuf.

  • eCAL

    Discontinued Please visit the new repository: https://github.com/eclipse-ecal/ecal (by continental)

  • I would concider using eCAL since it blasts everything out of the water in terms of performance and comes with some handy tooling for inspection of messages in-travel.

  • json

    A C++11 library for parsing and serializing JSON to and from a DOM container in memory. (by boostorg)

  • Bitsery

    Your binary serialization library

  • If size and performance matter, then take a look at bitsery. * it might be 9x+ faster than cereal and 18x faster than protobuf. * size-wise, you might save 20-30% by default * on top of that you additional might opt-in into: * bit-level serialization control (e.g. if your values are in the range 1000-2000 it will take you 10bits, or use VLE) * backward-forward compatibility support * pointer support, including raw pointers with the ability to provide custom allocator. * and powerful extensions system, which allows you to further customize things in any way you want it :)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts