# google/jsonapi

jsonapi.org style payload serializer and deserializer

Repository: https://github.com/google/jsonapi
Canonical: https://ross.abutalabs.com/products/jsonapi
Homepage: http://godoc.org/github.com/google/jsonapi
Language: Go
License: MIT
License Family: permissive
Archived: true
Last push: 2024-07-02T14:03:51+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4076, "days_push": 792, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1414, forks 220 (observed 2026-08-28T04:04:39.639545+00:00)

## What it is
A Go library for serializing and deserializing JSON payloads that comply with the JSON API (api.org) specification. It uses struct tags to map existing model structs to JSON API format, including relationship side-loading, without requiring separate payload structs.

## Use cases
- serialize Go structs to api.org compliant payloads
- deserialize JSON API request bodies into Go structs
- handle JSON API relationships with included side-loaded records
- build a Go web API that follows the JSON:API spec
- avoid writing duplicate payload structs for JSON API responses

## When to choose
- your API must conform to the api.org specification
- you want to reuse existing model structs with struct tags instead of dedicated DTOs
- you need automatic handling of relationships and included records in Go

## When to avoid
- you just need plain JSON serialization (use encoding/)
- your API does not follow the JSON:API spec
- you need a library under active development (it carries a 'No Maintenance Intended' badge)

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization
- domain: web-development, apis, backend
- platform: go
- tags: api, struct-tags, payload-serialization, api-spec

## Member repositories
- google/jsonapi (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:39.639545+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-30T04:38:12.877357+00:00, confidence not recorded.
  - readme: https://github.com/google/jsonapi (fetched 2026-08-28T04:04:39.639545+00:00, sha bbb540b78e9e)
  - homepage: http://godoc.org/github.com/google/jsonapi (fetched 2026-08-29T11:51:04.647825+00:00, sha 1d0ee5b4a7de)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T11:51:04.655343+00:00, sha 757852027879)
  - site_page: https://pkg.go.dev/github.com/google/jsonapi (fetched 2026-08-29T11:51:04.651926+00:00, sha 649b922396fd)
  - site_page: https://go.dev/project (fetched 2026-08-29T11:51:04.657749+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
