{"id":242558,"name":"lazy_as_json","ecosystem":"rubygems","description":"Lazy As Json\n\nA simple and concise way to use as_json with “only”, “except” and other options without using them literally.\n\nInstead of using this -\n\n`User.as_json(only: [:id, :first_name, profiles: [:company, :location]])`\n\nYou can perhaps use this -\n\n`User.as_json(only_keys: ‘_,first_name,profiles(p),p.company,p.location’)`\n\nAs simple as this.\n\nYou can control what your API response should include through a flexible parameter string.\n\ni.e. - “/api/v1/users/me?_keys=_,last_name,profiles(p),p.company,p.location”\n\nThis parameter string could dig through the nested objects and their nesting too.\nJust to reduce the API response size significantly, you can use this parameter control over wherever it is used.\nHowever it might seems quite trivial but frankly speaking it saves lot in response data hence faster loading time at client side.\n\nMoreover as it uses Hash.new and constructs attribute on runtime, you can throttle calling from the expensive method by using this parameter string.\n","homepage":"http://hasan.wordpress.com","licenses":null,"normalized_licenses":[],"repository_url":"https://github.com/we4tech/lazy-as-json","keywords_array":[],"namespace":null,"versions_count":1,"first_release_published_at":"2016-03-28T04:59:54.435Z","latest_release_published_at":"2016-03-28T04:59:54.435Z","latest_release_number":"0.1.0","last_synced_at":"2026-09-29T15:22:30.875Z","created_at":"2022-04-06T02:56:25.875Z","updated_at":"2026-09-29T15:22:34.282Z","registry_url":"https://rubygems.org/gems/lazy_as_json","install_command":"gem install lazy_as_json -s https://rubygems.org","documentation_url":"http://www.rubydoc.info/gems/lazy_as_json/","metadata":{"funding":null},"repo_metadata":{"id":56880828,"uuid":"54857860","full_name":"we4tech/lazy-as-json","owner":"we4tech","description":"Take control on what to return from the API response, define the attributes map in a short syntax over parameter. ","archived":false,"fork":false,"pushed_at":"2016-03-28T14:48:34.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-09-07T21:53:31.677Z","etag":null,"topics":["constructs-attribute","json"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/we4tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-28T01:53:36.000Z","updated_at":"2018-10-04T14:27:13.000Z","dependencies_parsed_at":"2022-08-20T13:00:39.349Z","dependency_job_id":null,"html_url":"https://github.com/we4tech/lazy-as-json","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/we4tech/lazy-as-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/we4tech","download_url":"https://codeload.github.com/we4tech/lazy-as-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":342085742,"owners_count":37847643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-09-29T02:00:06.972Z","response_time":187,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"},"owner_record":{"login":"we4tech","name":"Hossain Khan","uuid":"4054","kind":"user","description":"I enjoy reading code, debugging, and understanding systems.","email":"","website":null,"location":"New York","twitter":"we4tech","company":"@WeWork ","icon_url":"https://avatars.githubusercontent.com/u/4054?v=4","repositories_count":57,"last_synced_at":"2024-04-14T15:24:04.941Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/we4tech","funding_links":[],"total_stars":114,"followers":166,"following":88,"created_at":"2022-11-02T17:00:54.301Z","updated_at":"2024-04-14T15:24:13.236Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/we4tech","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/we4tech/repositories"},"tags":[{"name":"v0.1.0","sha":"e535d2a548aa644afcd849ab39faab224c12a52d","kind":"tag","published_at":"2016-03-28T04:59:08.000Z","download_url":"https://codeload.github.com/we4tech/lazy-as-json/tar.gz/v0.1.0","html_url":"https://github.com/we4tech/lazy-as-json/releases/tag/v0.1.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/we4tech/lazy-as-json@v0.1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/tags/v0.1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/tags/v0.1.0/manifests"}]},"repo_metadata_updated_at":"2026-09-29T15:22:34.282Z","dependent_packages_count":0,"downloads":3931,"downloads_period":"total","dependent_repos_count":0,"rankings":{"downloads":81.80156014466587,"dependent_repos_count":46.781949801970555,"dependent_packages_count":15.705942029816185,"stargazers_count":33.2408622735271,"forks_count":16.534742561715834,"average":38.81301136233911},"purl":"pkg:gem/lazy_as_json","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/rubygems/lazy_as_json","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/rubygems/lazy_as_json","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/rubygems/lazy_as_json/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2026-09-07T21:50:35.883Z","issues_count":0,"pull_requests_count":0,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":null,"issues_closed_count":0,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/we4tech%2Flazy-as-json/issues","maintainers":[],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/lazy_as_json/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/lazy_as_json/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/lazy_as_json/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/lazy_as_json/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/lazy_as_json/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/lazy_as_json/codemeta","maintainers":[{"uuid":"2967","login":"we4tech","name":null,"email":null,"url":null,"packages_count":6,"html_url":"https://rubygems.org/profiles/we4tech","role":null,"created_at":"2022-11-09T09:38:19.818Z","updated_at":"2022-11-09T09:38:19.818Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/maintainers/we4tech/packages"}]}