A high-performance, feature-rich idiomatic Go library for encoding and decoding msgpack, cbor, json, binc, and simple formats.
go-codec is an idiomatic Go library for encoding and decoding data across multiple formats like msgpack, cbor, json, binc, and simple. It solves the need for a high-performance, feature-rich serialization solution in Go applications, supporting both binary and text formats.
Go developers building applications that require efficient data serialization for networking, storage, or RPC communication, especially those needing multi-format support.
Developers choose go-codec for its exceptional performance, comprehensive format support, and idiomatic Go design, which includes tools like codecgen for optimization and benchmarks for comparison.
idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Optimized for speed with support for generics and monomorphization via build tags, as highlighted in the README, making it ideal for data-intensive applications.
Handles multiple binary and text formats including msgpack, cbor, json, binc, and simple within a single library, reducing the need for multiple dependencies.
Built with Go 1.20+ conventions and seamlessly integrates with Go's type system, ensuring clean and maintainable code.
Includes codecgen for generating optimized codec implementations, which can significantly boost performance by avoiding reflection overhead.
Requires setting build tags for features like monomorphization and generics, which complicates the build process and can be error-prone for newcomers.
Designed for Go 1.20+, making it incompatible with projects stuck on older versions of Go, limiting adoption in legacy systems.
For optimal performance, reliance on codecgen adds an extra step in development, increasing setup time and workflow complexity compared to reflection-only libraries.