go-json is a fast JSON encoder and decoder for Go that maintains full compatibility with the standard library's encoding/json package.
The tool addresses the need for faster JSON serialization and deserialization without requiring developers to change their code. It achieves this speed through optimization techniques including buffer reuse and automatic code generation, while preserving the same API surface as encoding/json. This means existing code can switch to go-json by simply changing the import statement, with no other modifications needed.
Developers should choose go-json if they need JSON performance improvements in existing Go projects without refactoring. It suits any application where encoding/json is currently used but performance has become a bottleneck. Unlike alternatives such as json-iterator/go, easyjson, gojay, and segmentio/encoding/json, go-json is the only option in its category that maintains complete compatibility with encoding/json while offering both encoder and decoder functionality. The README notes that some alternatives like segmentio/encoding/json lack support for streaming decode APIs such as Token, and that json-iterator/go has long-standing compatibility issues with the standard library.
The project maintains an active test suite including dedicated fuzzing tests in a separate repository to catch edge cases. Development is oriented toward reaching a stable release while remaining open to feature requests that would be implemented before the next major version milestone.