GJSON is a Go library designed for extremely fast, allocation-free retrieval of values from JSON documents. It enables you to query nested JSON structures using one-liner dot-notation or array-based paths and includes wildcard and comparison operators. The library is optimized for speed and zero allocations, benchmarking significantly faster than Go’s standard encoding/json unmarshal approaches. It supports parsing JSON lines (newline-delimited JSON) as an array for large stream processing. GJSON also provides modifiers (such as @reverse, @flatten, @keys) which allow transformation or inspection directly via the path syntax. Because it works on raw bytes or strings, it's suited for high-performance JSON parsing without needing to define Go struct types.

Features

  • Path-based retrieval using dot notation and wildcards
  • Returns Result objects with typed accessors (String, Int, Bool, etc)
  • Support for JSON Lines (multi-line) documents
  • Modifiers built into paths for transformations
  • Works directly with []byte or string, minimizing allocations
  • Iteration over arrays/objects with .ForEach()

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow GJSON

GJSON Web Site

Other Useful Business Software
Build AI Apps with Gemini 3 on Vertex AI Icon
Build AI Apps with Gemini 3 on Vertex AI

Access Google’s most capable multimodal models. Train, test, and deploy AI with 200+ foundation models on one platform.

Vertex AI gives developers access to Gemini 3—Google’s most advanced reasoning and coding model—plus 200+ foundation models including Claude, Llama, and Gemma. Build generative AI apps with Vertex AI Studio, customize with fine-tuning, and deploy to production with enterprise-grade MLOps. New customers get $300 in free credits.
Try Vertex AI Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GJSON!

Additional Project Details

Programming Language

Go

Related Categories

Go Parser Generators

Registered

2025-11-18