GJSON is a Go package that provides fast JSON value retrieval using simple path syntax.
The package solves the problem of efficiently extracting values from JSON documents without unmarshalling entire structures into Go types. It uses a streaming approach with dot notation paths, allowing developers to retrieve specific values with a single function call. The tool supports features including wildcard path matching, array indexing, iteration over objects and arrays, and query operations with comparison and pattern-matching operators.
GJSON suits projects where you need selective access to JSON data rather than full deserialization, particularly when working with large documents or when you only need a few fields. It is especially useful for command-line tools, data processing pipelines, and scenarios where performance matters. The README mentions related tools for complementary use cases: SJSON for modifying JSON and JJ as a command-line alternative.
The project maintains a stable codebase with focused development. Releases are infrequent, indicating the tool has reached a mature state where core functionality is complete. The project has minimal ongoing churn, suggesting the API and implementation are well-established. Documentation is comprehensive, with a dedicated syntax guide and interactive playground available for learning the path query language.