# ChimeraCoder/gojson

Automatically generate Go (golang) struct definitions from example JSON

Repository: https://github.com/ChimeraCoder/gojson
Canonical: https://ross.abutalabs.com/products/gojson
Language: Go
License: GPL-3.0
License Family: copyleft
Topics: gojson, go, cli, golang, go-generate
Last push: 2021-07-30T03:02:50+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4997, "days_push": 1860, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2688, forks 205 (observed 2026-08-28T04:07:10.853577+00:00)

## What it is
go is a Go CLI tool that automatically generates Go struct definitions from example JSON or YAML documents. It infers field types and  tags so developers can quickly create typed models for API responses.

## Use cases
- generate go structs from a  api response
- convert  to golang struct definitions
- create typed models for yaml config files
- quickly type an api payload in go
- generate struct tags from sample

## When to choose
- you are writing Go code that consumes a JSON or YAML API and want structs without hand-typing fields
- you want a fast, offline CLI that works with piped input like curl

## When to avoid
- you need code generation for languages other than Go
- you need runtime schema validation rather than compile-time structs
- you need actively maintained tooling with recent updates

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: cli, serialization, developer-tools
- domain: developer-tools, apis, web-development
- platform: cli, go, cross-platform
- tags: code-generation, struct-generation, -to-go, yaml, golang, command-line

## Member repositories
- ChimeraCoder/gojson (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:10.853577+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:17:43.788488+00:00, confidence not recorded.
  - readme: https://github.com/ChimeraCoder/gojson (fetched 2026-08-28T04:07:10.853577+00:00, sha b18f974488c9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
