{"id":13631708,"url":"https://github.com/operators-rb/operators-serializer","last_synced_at":"2025-04-17T22:31:36.283Z","repository":{"id":218443645,"uuid":"89339633","full_name":"operators-rb/operators-serializer","owner":"operators-rb","description":"You don’t need Active Model Serializers","archived":false,"fork":false,"pushed_at":"2017-05-11T08:50:45.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-01T22:49:29.754Z","etag":null,"topics":["json","operators","serializer"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/operators-rb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-04-25T09:00:31.000Z","updated_at":"2018-02-04T12:20:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"7724e8d5-5067-4a5c-8729-bc29c573c52b","html_url":"https://github.com/operators-rb/operators-serializer","commit_stats":null,"previous_names":["operators-rb/operators-serializer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operators-rb%2Foperators-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operators-rb%2Foperators-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operators-rb%2Foperators-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operators-rb%2Foperators-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/operators-rb","download_url":"https://codeload.github.com/operators-rb/operators-serializer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223768648,"owners_count":17199356,"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","operators","serializer"],"created_at":"2024-08-01T22:02:35.274Z","updated_at":"2024-11-08T23:31:27.825Z","avatar_url":"https://github.com/operators-rb.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Operators::Serializer\n\n[![Code Climate](https://codeclimate.com/github/operators-rb/operators-serializer/badges/gpa.svg)](https://codeclimate.com/github/operators-rb/operators-serializer)\n[![CircleCI](https://circleci.com/gh/operators-rb/operators-serializer.svg?style=shield\u0026circle-token=9542c2160ff69e57c6e71e2cd2d8ebfb5ec2abb4)](https://circleci.com/gh/operators-rb/operators-serializer)\n\nThe simplest serialization ever.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'operators-serializer'\n```\n\n## Usage\n\n```ruby\nclass UserSerializer \u003c Operators::Serializer\n  def as_json\n    {\n      id: id,\n      name: name,\n      email: email\n    }\n  end\nend\n```\n\n**Usage in Rails controllers**\n```ruby\nclass UsersController \u003c ApplicationController\n  def index\n    @users = UserSerializer.serialize_collection(User.all)\n  end\n\n  def show\n    @user = UserSerializer.new(User.find_by(id: params[:id]))\n  end\nend\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/operators-rb/operators-serializer.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperators-rb%2Foperators-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foperators-rb%2Foperators-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperators-rb%2Foperators-serializer/lists"}