{"id":13427841,"url":"https://github.com/rails-api/active_model_serializers","last_synced_at":"2025-05-13T10:51:59.031Z","repository":{"id":1958814,"uuid":"2889230","full_name":"rails-api/active_model_serializers","owner":"rails-api","description":"ActiveModel::Serializer implementation and Rails hooks","archived":false,"fork":false,"pushed_at":"2024-12-01T00:56:17.000Z","size":4469,"stargazers_count":5337,"open_issues_count":191,"forks_count":1388,"subscribers_count":78,"default_branch":"master","last_synced_at":"2025-05-05T17:31:58.241Z","etag":null,"topics":["json","resource-serializer","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"lukescott/DraggableCollectionView","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rails-api.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG-0-08.md","contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-12-01T06:39:26.000Z","updated_at":"2025-05-04T17:19:13.000Z","dependencies_parsed_at":"2024-02-20T18:55:13.191Z","dependency_job_id":"b403d5d1-c440-4859-872e-574116f2b6ac","html_url":"https://github.com/rails-api/active_model_serializers","commit_stats":{"total_commits":994,"total_committers":201,"mean_commits":4.945273631840796,"dds":0.647887323943662,"last_synced_commit":"c6c38105209cacbfc784068722df6453a35ebd1f"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-api%2Factive_model_serializers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-api%2Factive_model_serializers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-api%2Factive_model_serializers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-api%2Factive_model_serializers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rails-api","download_url":"https://codeload.github.com/rails-api/active_model_serializers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542609,"owners_count":21764997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","resource-serializer","ruby"],"created_at":"2024-07-31T01:00:41.167Z","updated_at":"2025-05-05T17:33:35.745Z","avatar_url":"https://github.com/rails-api.png","language":"Ruby","readme":"# ActiveModelSerializers\n\n## About\n\nActiveModelSerializers is undergoing some renovations. See [Development Status](#status-of-ams).\n\n## Getting Help\n\nIf you find a bug, please report an [Issue](https://github.com/rails-api/active_model_serializers/issues/new)\nand see our [contributing guide](CONTRIBUTING.md).\n\nIf you have a question, please [post to Stack Overflow](http://stackoverflow.com/questions/tagged/active-model-serializers).\n\nIf you'd like to chat, we have a [community slack](http://amserializers.herokuapp.com).\n\nThanks!\n\n## Documentation\n\nIf you're reading this at https://github.com/rails-api/active_model_serializers you are\nreading documentation for our `master`, which is not yet released.\n\n\u003ctable\u003e\n  \u003ctr\u003e  \n    \u003ctd\u003e\n      \u003ca href='https://github.com/rails-api/active_model_serializers/tree/0-10-stable'\u003e0.10 (0-10-stable) Documentation\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href='http://www.rubydoc.info/gems/active_model_serializers/0.10.6'\u003e\n        \u003cimg src='http://img.shields.io/badge/yard-docs-blue.svg' /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href='https://github.com/rails-api/active_model_serializers/tree/v0.10.6/docs'\u003e\n        Guides\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href='https://github.com/rails-api/active_model_serializers/tree/0-9-stable'\u003e0.9 (0-9-stable) Documentation\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href='http://www.rubydoc.info/github/rails-api/active_model_serializers/0-9-stable'\u003e\n        \u003cimg src='http://img.shields.io/badge/yard-docs-blue.svg' /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href='https://github.com/rails-api/active_model_serializers/tree/0-8-stable'\u003e0.8 (0-8-stable) Documentation\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href='http://www.rubydoc.info/github/rails-api/active_model_serializers/0-8-stable'\u003e\n        \u003cimg src='http://img.shields.io/badge/yard-docs-blue.svg' /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Status of AMS\n\n### *Status*:\n\n- ❗️ All existing PRs against master will need to be closed and re-opened against 0-10-stable, if so desired\n- ❗️ Master, for the moment, won't have any released version of AMS on it.\n- :eyes: See below for [alternatives](#alternatives)\n\n\n### *Changes to 0.10.x maintenance*:\n\n- The 0.10.x version has become a huge maintenance version.  We had hoped to get it in shape for a 1.0 release, but it is clear that isn't going to happen.  Almost none of the maintainers from 0.8, 0.9, or earlier 0.10 are still working on AMS. We'll continue to maintain 0.10.x on the 0-10-stable branch, but maintainers won't otherwise be actively developing on it.\n  - We may choose to make a 0.11.x ( 0-11-stable) release based on 0-10-stable that just removes the deprecations.\n\n### *What's happening to AMS*:\n\n- There's been a lot of churn around AMS since it began back in [Rails 3.2](CHANGELOG-prehistory.md) and a lot of new libraries are around and the JSON:API spec has reached 1.0.\n- If there is to be a 1.0 release of AMS, it will need to address the general needs of serialization in much the way ActiveJob can be used with different workers.\n- The next major release *is* in development. We're starting simple and avoiding, at least at the outset, all the complications in AMS version, especially all the implicit behavior from guessing the serializer, to the association's serializer, to the serialization type, etc.\n- The basic idea is that models to serializers are a one to many relationship.  Everything will need to be explicit.  If you want to serialize a User with a UserSerializer, you'll need to call it directly.  The serializer will essentially be for defining a basic JSON:API resource object: id, type, attributes, and relationships. The serializer will have an as_json method and can be told which fields (attributes/relationships) to serialize to JSON and will likely *not* know serialize any more than the relations id and type.  Serializing anything more about the relations would require code that called a serializer. (This is still somewhat in discussion).\n- If this works out, the idea is to get something into Rails that existing libraries can use.\n\nSee [PR 2121](https://github.com/rails-api/active_model_serializers/pull/2121) where these changes were introduced for more information and any discussion.\n\n\n\n## Alternatives\n\n- [jsonapi-rb](http://jsonapi-rb.org/) is a [highly performant](https://gist.github.com/NullVoxPopuli/748e89ddc1732b42fdf42435d773734a) and modular JSON:API-only implementation.  There's a vibrant community around it that has produced projects such as [JSON:API Suite](https://jsonapi-suite.github.io/jsonapi_suite_deprecated/).\n- [fast_jsonapi](https://github.com/fast-jsonapi/fast_jsonapi) is a lightning fast JSON:API serializer for Ruby Objects.\n- [jsonapi-resources](https://github.com/cerebris/jsonapi-resources) is a popular resource-focused framework for implementing JSON:API servers.\n- [blueprinter](https://github.com/procore/blueprinter) is a fast, declarative, and API spec agnostic serializer that uses composable views to reduce duplication. From your friends at Procore.\n- [Alba](https://github.com/okuramasafumi/alba) is fast and spec agnostic serialization solution. It has some unique features such as global or per-resource error handling.\n- [Transmutation](https://github.com/spellbook-technology/transmutation) is fast and lightweight JSON attribute serialization solution. It provides an intuitive serializer lookup, inspired from AMS.\n\n\nFor benchmarks against alternatives, see https://github.com/rails-api/active_model_serializers/tree/benchmarks\n\n\n\n## Semantic Versioning\n\nThis project adheres to [semver](http://semver.org/)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n","funding_links":[],"categories":["`API Frameworks`","API","Features","Web Apps, Services \u0026 Interaction","Uncategorized","Ruby","Serialization","API Builder","RESTful API","API Frameworks","API Builder and Discovery","Serializers"],"sub_categories":["`Ruby`","Omniauth","API Builders","Uncategorized","Ruby"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frails-api%2Factive_model_serializers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frails-api%2Factive_model_serializers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frails-api%2Factive_model_serializers/lists"}