A high-performance drop-in replacement for Go's standard encoding/json package with 100% compatibility.
json-iterator/go is a high-performance JSON parsing and encoding library for Go that serves as a drop-in replacement for the standard encoding/json package. It solves performance bottlenecks in JSON processing by providing significantly faster operations with reduced memory allocations while maintaining 100% compatibility with the standard API.
Go developers working with JSON serialization in performance-sensitive applications, such as web servers, APIs, and data processing pipelines.
Developers choose json-iterator/go because it offers substantial performance improvements over the standard library without requiring code changes or breaking compatibility, making it an easy upgrade for existing projects.
A high-performance 100% compatible drop-in replacement of "encoding/json"
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show decoding up to 6x faster and encoding 2.6x faster than encoding/json, with significantly reduced memory allocations, such as decode using 160 B/op vs. 1960 B/op.
It requires only an import change, as shown in the usage examples, making it a seamless replacement for encoding/json without code modifications.
Optimized to minimize allocations, with benchmarks indicating lower allocation times, e.g., 3 allocs/op for decode compared to 99 allocs/op for the standard library.
Unlike alternatives like easyjson, it works without static code generation, simplifying the build process and development workflow.
Introduces an external library dependency, which carries maintenance and security risks not present in Go's battle-tested standard library.
Performance gains are data-dependent, as noted in the README, and real-world improvements may vary based on JSON structure and workload, making lab results not always representative.
Full documentation is hosted externally on jsoniter.com, which can be less integrated and up-to-date than Go's official documentation for encoding/json.