# rails-api/active_model_serializers

ActiveModel::Serializer implementation and Rails hooks

Repository: https://github.com/rails-api/active_model_serializers
Canonical: https://ross.abutalabs.com/products/active_model_serializers
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby, json, resource-serializer
Last push: 2025-12-08T16:12:19+00:00

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

## Adoption (not part of the score)
Stars 5341, forks 1371 (observed 2026-08-28T04:09:15.853600+00:00)

## What it is
ActiveModelSerializers is a Ruby library that provides an ActiveModel::Serializer implementation and Rails hooks for rendering model objects as JSON in Rails APIs. It supports multiple serialization formats including JSON:API and attributes-based output.

## Use cases
- serialize Rails models to JSON responses
- build JSON:API compliant REST APIs in Rails
- control which attributes and associations are exposed in API responses
- replace default Rails JSON rendering with structured serializers
- version API payloads with different serializer adapters

## When to choose
- you have an existing Rails app using AMS 0.10.x and want a stable, maintained serializer
- you need JSON:API or simple attribute serialization tightly integrated with Rails controllers
- your team already relies on ActiveModel::Serializer conventions

## When to avoid
- you are starting a new project - the README points to alternatives since no 1.0 release is planned
- you need actively developed features or long-term new development
- you are not using Rails or ActiveModel

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, middleware
- domain: web-development, backend, apis
- platform: ruby
- tags: rails, -serialization, -api, active-model, api-serialization, web-server

## Member repositories
- rails-api/active_model_serializers (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:15.853600+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-29T17:58:49.896080+00:00, confidence not recorded.
  - readme: https://github.com/rails-api/active_model_serializers (fetched 2026-08-28T04:09:15.853600+00:00, sha 39564b1bdd37)
- Data as of 2026-08-30T08:39:29.467469+00:00.
