For a high performance serialization library for Go, the strongest matches are golang/protobuf (This is the official Protocol Buffers implementation for Go), gogo/protobuf (This library provides a high-performance, reflection-free implementation of Protocol) and google/protobuf (This is a foundational binary serialization framework that provides). google/flatbuffers and bytedance/sonic round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
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.