For a high performance serialization library for Go, the first results are golang/protobuf (This is the official Protocol Buffers implementation for Go, providing a high-performance binary serialization framework that supports schema evolution and efficient data exchange, making it the standard choice for the requested category), gogo/protobuf (This library provides a high-performance, reflection-free implementation of Protocol Buffers for Go, offering the exact binary serialization and code-generation capabilities required for efficient data handling) and google/protobuf (This is a foundational binary serialization framework that provides the schema-driven, high-performance encoding required for Go, though it requires using a compiler to generate the necessary Go code rather than being a native Go-only library). google/flatbuffers and bytedance/sonic round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best go serialization libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
This project is a Protocol Buffers implementation for Go, providing a binary serialization framework to convert native data structures into a compact binary format for efficient network transmission and storage. It functions as a language bindings generator, utilizing a compiler plugin to create Go source code from platform-neutral protocol buffer definitions. The implementation includes a JSON data mapper that transforms structured binary messages into JSON format to facilitate compatibility with web services and external APIs. It also enables cross-language data exchange by using a common s
This is the official Protocol Buffers implementation for Go, providing a high-performance binary serialization framework that supports schema evolution and efficient data exchange, making it the standard choice for the requested category.
This project is a Protocol Buffers Go compiler and code generation framework that translates schema definitions into optimized Go structures and reflection-free serialization methods. It includes a gRPC service generator for producing client and server communication code and a serialization performance toolkit for generating automated benchmarks and test suites. The framework features a plugin-based system for transforming data definitions into source code with custom field mapping and struct tag injection. It allows for custom type mapping and struct type overriding to link data fields to sp
This library provides a high-performance, reflection-free implementation of Protocol Buffers for Go, offering the exact binary serialization and code-generation capabilities required for efficient data handling.
Protocol Buffers is a binary serialization framework used to encode structured information into compact payloads to reduce network bandwidth and storage. It functions as a cross-language data interchange standard that enables different platforms and languages to exchange structured data using a shared schema. The project includes an interface definition language compiler that transforms schema definitions into type-safe source code for multiple target programming languages. This mechanism decouples data structures from specific language memory layouts and ensures consistent data handling acro
This is a foundational binary serialization framework that provides the schema-driven, high-performance encoding required for Go, though it requires using a compiler to generate the necessary Go code rather than being a native Go-only library.
FlatBuffers is a cross-platform serialization library designed for performance-critical applications that require efficient, zero-copy data access. By organizing data in a structured binary format, it allows applications to read and write complex data structures directly from memory-mapped buffers without the need for intermediate parsing or temporary object allocation. The project distinguishes itself through a schema-driven approach that balances high-performance access with long-term data evolution. It utilizes a unique memory layout featuring relative offsets and inline fixed-size structu
FlatBuffers provides a high-performance, schema-driven binary serialization format with zero-copy deserialization capabilities that is fully supported and idiomatic for use within Go applications.
Sonic is a high-performance Go JSON serialization library that provides tools for encoding and decoding native data structures. It functions as a JIT-accelerated encoder, a JSON AST parser, a stream processor, and a lazy decoder. The project utilizes just-in-time machine code generation to optimize the encoding of large data schemas and employs a JIT assembler to maximize serialization and deserialization speeds. It features a precompiled schema warmup process to prevent latency spikes during initial execution and leverages SIMD hardware instructions for accelerated parsing. The library cove
Sonic is a high-performance JSON serialization library for Go that utilizes JIT compilation and SIMD instructions to achieve industry-leading speeds, including support for zero-copy deserialization.
This project is a high-performance JSON library for Go, serving as a replacement for the standard encoding/json package. It provides a serialization engine for encoding and decoding data structures, alongside a schemaless parser for extracting specific values from JSON blobs using paths. The library distinguishes itself through a focus on reducing CPU and memory overhead. It implements a high-performance encoder that utilizes buffer reuse and reduced float precision to increase data throughput. Broad capability areas include data serialization, high-performance JSON processing, and schema-le
This library is a high-performance JSON processing tool for Go that serves as a drop-in replacement for the standard library, focusing on speed and memory efficiency through techniques like buffer pooling and zero-copy writing.
Protocol Buffers is a language-neutral, platform-agnostic mechanism for serializing structured data. It provides a schema-driven toolchain that compiles declarative data definitions into type-safe source code, enabling consistent communication and strongly typed API contracts across services written in different programming languages. The project distinguishes itself through a highly efficient binary wire format that utilizes tag-based encoding and variable-width integer compression to minimize payload size and processing overhead. It supports robust evolutionary schema management, allowing d
This is the official implementation of the Protocol Buffers serialization format, which provides the high-performance binary encoding and schema evolution capabilities required for Go, though it functions as a language-neutral toolchain rather than a Go-native library.
msgpack.orgGo MessagePack encoding for Golang
This library provides a high-performance implementation of the MessagePack binary format for Go, offering a fast alternative to standard JSON encoding with support for custom types and efficient serialization.
idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.orgGo
This library provides high-performance, reflection-free encoding and decoding for multiple binary formats like MessagePack and CBOR, making it a strong candidate for efficient data serialization in Go.
CapnProto is a zero-copy serialization framework and remote procedure call system. It serves as a C++ communication library providing a schema-based data interchange format that eliminates the need to encode or decode data before reading it from memory. The system enables high-performance data serialization and low-latency network communication. It supports cross-language data exchange by using a defined schema to ensure consistent binary representation across different platforms. The framework provides tools for implementing remote procedure calls, allowing functions to be invoked on a remo
This is a C++ framework for zero-copy serialization and RPC, which does not provide the Go-specific implementation or native Go library support required for your project.
MessagePack is a binary object serialization library and a cross-platform data exchange format. It serves as a binary alternative to JSON, converting structured data into a space-efficient binary representation for network transmission and storage. The system provides a standardized format for swapping complex data types across different programming languages and architectures. It allows for the definition of custom data type encoding by pairing application-specific information with specialized serialization markers. The library handles the encoding and decoding of diverse data types, includ
This repository provides the MessagePack specification and a cross-language protocol, but it is not a Go-specific library implementation for serialization and deserialization.
Fory is a cross-language serialization framework and binary data serializer designed to convert complex object graphs into a compact binary format for high-performance data exchange. It includes an IDL-based schema compiler to transform interface definition language files into type-safe native data models and a schema evolution manager to maintain forward and backward compatibility. The project features a zero-copy data access layer that allows reading specific fields from binary rows without deserializing the entire object. It supports dual-mode serialization, enabling a toggle between a por
This is a cross-language serialization framework primarily implemented in Java rather than a native Go library, making it a tool you would integrate via RPC or bindings rather than a direct Go-native serialization implementation.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| golang/protobuf | 10.1K | Go | BSD-3-Clause | |
| gogo/protobuf | 5.7K | Go | NOASSERTION | |
| google/protobuf |
| 71.4K |
| C++ |
| NOASSERTION |
| google/flatbuffers | 25.6K | C++ | apache-2.0 |
| bytedance/sonic | 9.5K | Go | Apache-2.0 |
| json-iterator/go | 13.9K | Go | MIT |
| protocolbuffers/protobuf | 71.4K | C++ | NOASSERTION |
| vmihailenco/msgpack | 2.7K | Go | BSD-2-Clause |
| ugorji/go | 2K | Go | MIT |
| capnproto/capnproto | 13.1K | C++ | NOASSERTION |