Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. gabs

gabs

MITGo

A Go utility for parsing, creating, and editing dynamic or unknown JSON structures with a simple wrapper around encoding/json.

GitHubGitHub
3.5k stars201 forks0 contributors

What is gabs?

Gabs is a Go library that simplifies working with dynamic or unknown JSON structures. It provides a convenient wrapper around Go's standard encoding/json package, making it easier to navigate, modify, and generate JSON without complex type assertions. It reduces boilerplate when dealing with dynamic JSON by adding minimal, pragmatic helper methods.

Target Audience

Go developers who need to parse, generate, or manipulate JSON data with flexible or unknown schemas, such as those working with APIs, configuration files, or data processing pipelines. It's particularly useful for scenarios where static struct definitions are impractical.

Value Proposition

Developers choose Gabs because it offers a simple, chainable API for JSON manipulation that stays close to Go's standard library while adding convenience features like dot-path navigation, JSON merging, and programmatic generation. Its minimal design avoids unnecessary complexity, making it a pragmatic choice over more heavyweight alternatives.

Overview

For parsing, creating and editing unknown or dynamic JSON in Go

Use Cases

Best For

  • Parsing and navigating JSON with unknown or dynamic structures using dot-path notation, multi-argument search, or JSON pointers.
  • Programmatically generating and modifying JSON objects and arrays with chainable methods like Set, ArrayAppend, and ArrayOfSize.
  • Iterating over JSON object keys and values or array elements in a structured way.
  • Merging two JSON containers where collisions are automatically converted into arrays.
  • Checking for the existence of specific paths within a JSON structure without manual error handling.
  • Converting modified JSON structures back to strings with optional pretty-printing for output or debugging.

Not Ideal For

  • Projects with static, known JSON schemas where defining Go structs would provide better type safety and performance.
  • High-throughput applications requiring maximum parsing speed, as the dynamic map[string]interface{} approach adds overhead.
  • Scenarios needing built-in JSON schema validation or complex error handling beyond basic existence checks.
  • Teams that prioritize compile-time safety and prefer avoiding runtime type assertions altogether.

Pros & Cons

Pros

Flexible Path Navigation

Supports dot-path notation (Path), multi-argument search (Search), and JSON pointers (JSONPointer) for easy access to nested data, as shown in the parsing examples.

Chainable Modification Methods

Provides methods like Set, ArrayAppend, and ArrayOfSize that can be chained for programmatic JSON generation and editing, demonstrated in the generation examples.

Built-in Merge Functionality

Can merge two JSON containers with collisions automatically converted into arrays, useful for combining data without manual handling.

Simple Iteration Support

Offers ChildrenMap() for objects and Children() for arrays, simplifying iteration over dynamic structures, as illustrated in the iteration examples.

Cons

Number Parsing Overhead

By default, all numbers are parsed as float64, requiring extra steps like json.Decoder with UseNumber() for integers, which adds complexity.

No Validation Features

Lacks built-in JSON schema validation or advanced error handling, making it less suitable for applications requiring robust data integrity checks.

Memory Inefficiency

Relies on map[string]interface{} for dynamic handling, which can be memory-intensive and slower for large or deeply nested JSON compared to static typing.

Frequently Asked Questions

Quick Stats

Stars3,530
Forks201
Contributors0
Open Issues29
Last commit2 years ago
CreatedSince 2014

Tags

#parsing#dynamic-json#go-library#data-structures#encoding-json#json-manipulation#utility-library#golang#json-parsing#json#go

Built With

G
Go

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

GJSONGJSON

Get JSON values quickly - JSON parser for Go

Stars15,546
Forks906
Last commit2 months ago
SJSONSJSON

Set JSON values very quickly in Go

Stars2,721
Forks184
Last commit2 months ago
gojsongojson

Automatically generate Go (golang) struct definitions from example JSON

Stars2,688
Forks205
Last commit5 years ago
fastjsonfastjson

Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection

Stars2,463
Forks157
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub