# rails/jbuilder

Jbuilder: generate JSON objects with a Builder-style DSL

Repository: https://github.com/rails/jbuilder
Canonical: https://ross.abutalabs.com/products/jbuilder
Language: Ruby
License: MIT
License Family: permissive
Last push: 2026-06-01T17:42:54+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 85, release rhythm 62, longevity 100
- inputs: {"age_days": 5393, "days_push": 93, "days_rel": 99, "gap_med": 143.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4420, forks 454 (observed 2026-08-28T04:08:48.768319+00:00)

## What it is
Jbuilder is a Ruby gem providing a simple Builder-style DSL for declaring JSON structures, commonly used in Rails views via ..jbuilder templates. It handles conditionals, loops, partials, and dynamic attribute names more cleanly than manipulating raw hashes.

## Use cases
- render JSON API responses in Rails views
- generate JSON with conditionals and loops
- build nested JSON structures from ActiveRecord models
- create top-level JSON arrays for index actions
- merge existing hashes into JSON output
- define JSON keys dynamically at runtime

## When to choose
- you're building a Rails app that serves JSON endpoints
- you want view-layer JSON templates instead of serializers
- your JSON generation involves complex conditionals and collections

## When to avoid
- you're not using Ruby or Rails
- you prefer serializer-style objects like ActiveModel::Serializers or fast_api
- you need high-performance JSON generation with minimal overhead

## Facets
- artifact type: library
- maturity: stable
- function: serialization, templating, api-framework
- domain: web-development, backend, apis
- platform: ruby
- tags: -generation, builder-dsl, rails, view-templates, web-server

## Member repositories
- rails/jbuilder (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:48.768319+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-29T18:20:59.533726+00:00, confidence not recorded.
  - readme: https://github.com/rails/jbuilder (fetched 2026-08-28T04:08:48.768319+00:00, sha 8ba7fb317871)
- Data as of 2026-08-30T08:39:29.467469+00:00.
