# buger/jsonparser

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/buger-jsonparser).**

5,629 stars · 452 forks · Go · MIT

## Links

- GitHub: https://github.com/buger/jsonparser
- awesome-repositories: https://awesome-repositories.com/repository/buger-jsonparser.md

## Topics

`go` `json` `json-parser` `parser` `perfomance`

## Description

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 callback functions. A single-pass multi-key extraction feature scans a JSON payload once to collect values at several specified paths, minimizing parsing overhead.

The documentation covers installation via standard Go tooling and provides examples for field extraction, value modification, key removal, and iteration patterns.

## Tags

### Data & Databases

- [JSON Parsers](https://awesome-repositories.com/f/data-databases/json-parsers.md) — Parses JSON without requiring a schema, offering fast field extraction and modification by key path.
- [Schema-Free Parsers](https://awesome-repositories.com/f/data-databases/json-parsers/schema-free-parsers.md) — Parses JSON directly from byte slices using a deterministic state machine without requiring predefined structs or type schemas.
- [JSON Key Path Lookups](https://awesome-repositories.com/f/data-databases/key-value-data-manipulation/key-lookups-by-value/json-key-path-lookups.md) — Navigate a JSON structure by a sequence of keys and return the raw bytes and type of the matched value. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))
- [Single-Pass Multi-Key Extractors](https://awesome-repositories.com/f/data-databases/storage-engines/key-value/multi-key-retrieval/single-pass-multi-key-extractors.md) — Extracting several distinct fields from a JSON payload in a single scan to minimize parsing overhead.
- [Lazy Extraction](https://awesome-repositories.com/f/data-databases/structured-data-extraction/lazy-extraction.md) — Defers type coercion and value conversion until the caller explicitly requests a typed result.
- [Runtime Structure Inferrers](https://awesome-repositories.com/f/data-databases/structured-data-schemas/schema-inference/runtime-structure-inferrers.md) — Infers JSON structure and value types at runtime without requiring a predefined Go struct or schema.
- [Zero-Copy Parsing](https://awesome-repositories.com/f/data-databases/zero-copy-data-access-libraries/zero-copy-deserialization/zero-copy-parsing.md) — Parses JSON directly from the input byte slice without allocating intermediate strings or objects.
- [JSON Array Iteration](https://awesome-repositories.com/f/data-databases/immutable-array-updates/array-element-modifiers/array-element-accessors/json-array-iteration.md) — Walks each element of a JSON array sequentially, invoking a callback with the element's raw value and detected type. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))
- [JSON Object Iteration](https://awesome-repositories.com/f/data-databases/key-value-store-iterators/json-object-iteration.md) — Walks each key-value pair of a JSON object and calls a function with the key, value, and type. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))
- [Callback-Driven Iterators](https://awesome-repositories.com/f/data-databases/key-value-store-iterators/json-object-iteration/callback-driven-iterators.md) — Walks through JSON arrays or objects element by element, processing each value or key-value pair with a callback function.
- [JSON Key Removals](https://awesome-repositories.com/f/data-databases/key-value-stores/structured-object-mappings/object-linked-key-value-mappings/map-key-removals/json-key-removals.md) — Delete a value at a specified key path from an existing JSON byte slice. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))

### Artificial Intelligence & ML

- [Typed JSON Coercers](https://awesome-repositories.com/f/artificial-intelligence-ml/data-indexing/schema-less/value-extraction/typed-json-coercers.md) — Coerces a JSON value into a Go string, integer, float, or boolean and reports an error on type mismatch. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))
- [Spatial Key-Value Extraction](https://awesome-repositories.com/f/artificial-intelligence-ml/data-indexing/schema-less/value-extraction/spatial-key-value-extraction.md) — Extracts several key paths from a JSON payload in a single scan, calling a callback for each found value. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))

### Part of an Awesome List

- [JSON Value Access Interfaces](https://awesome-repositories.com/f/awesome-lists/data/json-and-data-parsing/json-value-access-interfaces.md) — Inserts, updates, or removes values at specific key paths within an existing JSON byte slice without full deserialization.
- [JSON Value Modifiers](https://awesome-repositories.com/f/awesome-lists/data/json-and-data-parsing/json-value-access-interfaces/json-value-modifiers.md) — Provides in-place insertion, update, and deletion of values at specified key paths within JSON byte slices.
- [JSON Processing](https://awesome-repositories.com/f/awesome-lists/data/json-processing.md) — Fast JSON parser.

### Development Tools & Productivity

- [JSON Byte Range Modifiers](https://awesome-repositories.com/f/development-tools-productivity/in-place-binary-mutators/json-byte-range-modifiers.md) — Modifies JSON by locating a value's byte range and overwriting it directly in the source slice.
- [JSON Path Navigation](https://awesome-repositories.com/f/development-tools-productivity/path-matching-tools/json-path-navigation.md) — Navigates nested JSON objects and arrays by a dot-separated key path to retrieve raw values or typed data.

### Programming Languages & Runtimes

- [JSON Key Path Extractors](https://awesome-repositories.com/f/programming-languages-runtimes/object-key-extractors/json-key-listing/json-key-path-extractors.md) — Retrieves values from JSON by dot-separated key paths, returning raw bytes and type information.
- [Multi-Key Extractors](https://awesome-repositories.com/f/programming-languages-runtimes/object-key-extractors/json-key-listing/multi-key-extractors.md) — Ships a single-pass multi-key extraction feature that scans a JSON payload once to collect values at several specified paths.

### Software Engineering & Architecture

- [Path-Based Value Inserters](https://awesome-repositories.com/f/software-engineering-architecture/default-configuration-values/configuration-value-resolvers/path-based-value-inserters.md) — Inserts or updates a value at a given key path inside an existing JSON byte slice. ([source](https://cdn.jsdelivr.net/gh/buger/jsonparser@master/README.md))
- [JSON Token Scanners](https://awesome-repositories.com/f/software-engineering-architecture/finite-state-machine-engines/json-token-scanners.md) — Provides a deterministic state machine that walks JSON tokens to track nesting depth and structural boundaries.
- [Path-Based Tree Traversers](https://awesome-repositories.com/f/software-engineering-architecture/recursive-validation-engines/recursive-tree-traversers/dependency-tree-traversers/path-based-tree-traversers.md) — Navigates nested JSON by following a dot-separated key path through the parsed token stream.
