# Go JSON Libraries

> AI-ranked search results for `best go json libraries` on awesome-repositories.com — ordered by an LLM for relevance, best match first. 118 total matches; showing the top 10.

Explore on the web: https://awesome-repositories.com/q/best-go-json-libraries

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/best-go-json-libraries).**

## Results

- [bytedance/sonic](https://awesome-repositories.com/repository/bytedance-sonic.md) (9,492 ⭐) — 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
- [mailru/easyjson](https://awesome-repositories.com/repository/mailru-easyjson.md) (4,892 ⭐) — easyjson is a high-performance JSON serializer and memory-optimized parser for Go. It provides a reflectionless code generator that creates static Go methods for marshaling and unmarshaling data, eliminating the need for runtime reflection to improve execution speed.

The library reduces CPU and memory overhead through several optimization strategies. It employs a system of reusable memory buffer pools to minimize heap allocations and garbage collection pressure. Additionally, it utilizes string interning to deduplicate repeated values and zero-copy string referencing to point to existing buff
- [json-iterator/go](https://awesome-repositories.com/repository/json-iterator-go.md) (13,891 ⭐) — 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
- [goccy/go-json](https://awesome-repositories.com/repository/goccy-go-json.md) (3,687 ⭐) — go-json is a high-performance JSON serialization library for Go that serves as an encoder and decoder replacement for the standard library. It provides tools to convert native data structures to and from JSON format with optimized processing speeds.

The library includes a conditional serializer for filtering specific data structure fields during the encoding process and a colorizer to produce color-coded JSON strings for human readability.

The project supports context-aware marshaling to trigger specific logic during the serialization of complex data types.
- [tidwall/gjson](https://awesome-repositories.com/repository/tidwall-gjson.md) (15,521 ⭐) — gjson is a Go JSON parser designed for schema-less reading and value extraction. It allows for the retrieval of specific data from JSON documents using dot-notation paths without requiring the definition of predefined Go structs.

The library provides tools for path-based querying, including the use of wildcards and index-based queries to locate data within objects and arrays. It also functions as a JSON lines processor, treating multi-line documents as arrays to iterate and query individual entries.

Additional capabilities include converting JSON values into native Go types such as strings,
- [buger/jsonparser](https://awesome-repositories.com/repository/buger-jsonparser.md) (5,629 ⭐) — jsonparser is a Go library for parsing, extracting, and modifying JSON data by key path without requiring predefined structs or type schemas. It uses a deterministic state machine to parse JSON directly from byte slices, enabling zero-copy traversal and lazy typed value extraction.

The library provides key-path-based navigation to retrieve raw bytes and typed values from nested JSON structures, supporting extraction of strings, integers, floats, and booleans. It also enables in-place value modification and deletion at specified key paths, as well as iteration over arrays and objects using cal
- [bitly/go-simplejson](https://awesome-repositories.com/repository/bitly-go-simplejson.md) (3,743 ⭐) — go-simplejson is a JSON manipulation library for Go that provides schemaless parsing and modification of arbitrary JSON data. It serves as a wrapper for interacting with JSON structures without requiring the definition of predefined structs or schemas.

The library enables dynamic processing of JSON payloads through a recursive tree structure and a mutable node hierarchy. This allows for the extraction and modification of values from complex, nested objects where the data format may be unknown or change dynamically.

The project covers arbitrary JSON parsing and the retrieval of data from dyna
- [jeffail/gabs](https://awesome-repositories.com/repository/jeffail-gabs.md) (3,528 ⭐) — For parsing, creating and editing unknown or dynamic JSON in Go
- [pquerna/ffjson](https://awesome-repositories.com/repository/pquerna-ffjson.md) (2,994 ⭐) — faster JSON serialization for Go
- [valyala/fastjson](https://awesome-repositories.com/repository/valyala-fastjson.md) (2,458 ⭐) — Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection
