rails/jbuilder

Jbuilder: generate JSON objects with a Builder-style DSL

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 38 minutes ago
Added to GitGenius on September 15th, 2026
Created on November 27th, 2011
Open Issues & Pull Requests: 48 (+0)
GitHub issues: Enabled
Number of forks: 454
Total Stargazers: 4,420 (+0)
Total Subscribers: 84 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 16.4 days
Mean response time: 62.2 days
90th percentile: 184.3 days
Tracked items: 15

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 3,755 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (3)
  • attached PR (1)
  • feature (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Jbuilder is a Ruby DSL for generating JSON objects with a Builder-style syntax.

The tool solves the problem of constructing complex JSON responses in Rails applications, where manually building nested hash structures becomes unwieldy when conditionals and loops are involved. Instead of manipulating giant hashes, developers declare JSON structures using a fluent DSL that reads naturally and handles dynamic attributes, nested objects, arrays, and partials. The approach lets you build JSON incrementally using methods like `set!` for dynamic keys, `array!` for collections, and `child!` for nested objects.

Jbuilder suits Rails developers building JSON APIs who want cleaner, more maintainable response templates than raw hash construction. It integrates directly as an ActionView template language, allowing you to create `.json.jbuilder` view files alongside your HTML templates. The tool handles common API patterns including top-level arrays, nested objects, partial rendering with local variables, and collection rendering. It also provides caching support via Rails.cache, including fragment caching and conditional caching with `cache_if!`, plus key formatting options to convert snake_case keys to camelCase in output.

The project maintains steady activity with regular commits addressing bug fixes and feature enhancements. Development includes ongoing refinement of caching mechanisms and key formatting capabilities. The maintainers respond to issues and pull requests, indicating active stewardship of the codebase.