{"action":"created","issue":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1300","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1300/labels{/name}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1300/comments","events_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1300/events","html_url":"https://github.com/rails-api/active_model_serializers/pull/1300","id":113289409,"number":1300,"title":"Refactor JsonApi adapter in order to avoid recomputation of hashes fo…","user":{"login":"beauby","id":2215778,"avatar_url":"https://avatars.githubusercontent.com/u/2215778?v=3","gravatar_id":"","url":"https://api.github.com/users/beauby","html_url":"https://github.com/beauby","followers_url":"https://api.github.com/users/beauby/followers","following_url":"https://api.github.com/users/beauby/following{/other_user}","gists_url":"https://api.github.com/users/beauby/gists{/gist_id}","starred_url":"https://api.github.com/users/beauby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauby/subscriptions","organizations_url":"https://api.github.com/users/beauby/orgs","repos_url":"https://api.github.com/users/beauby/repos","events_url":"https://api.github.com/users/beauby/events{/privacy}","received_events_url":"https://api.github.com/users/beauby/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/C:%20JSON%20API","name":"C: JSON API","color":"CCCCCC"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/Needs%20Code%20Review","name":"Needs Code Review","color":"fbca04"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/Performance","name":"Performance","color":"DDDDDD"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/V:%200.10.x","name":"V: 0.10.x","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-26T05:47:15Z","updated_at":"2015-11-07T19:18:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1300","html_url":"https://github.com/rails-api/active_model_serializers/pull/1300","diff_url":"https://github.com/rails-api/active_model_serializers/pull/1300.diff","patch_url":"https://github.com/rails-api/active_model_serializers/pull/1300.patch"},"body":"…r included resources.\r\nRef: #1239\r\n\r\nPlus make the method names closer to the JSON API terminology.\r\n\r\nMain changes:\r\n + introduced the `attributes_for` method (for symmetry with `relationships_for`)\r\n + renamed `relationship_value_for` into `linkage_for`\r\n + computation of all hashes at once, with an annotation on each one saying whether it is a `primary` or `included` resource, so that no hash is ever computed twice, and there is not need for the `serializable_hash_for_single_resource` / `serializable_hash_for_collection` distinction. The adapter no longer calls itself recursively.\r\n + introduced `process_resource` which does the job of `add_included_resources_for`, `included_for`, `primary_data_for`, `serializable_hash_for_single_resource`, `serializable_hash_for_collection` (and removed those)\r\n"},"comment":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/comments/154740968","html_url":"https://github.com/rails-api/active_model_serializers/pull/1300#issuecomment-154740968","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1300","id":154740968,"user":{"login":"beauby","id":2215778,"avatar_url":"https://avatars.githubusercontent.com/u/2215778?v=3","gravatar_id":"","url":"https://api.github.com/users/beauby","html_url":"https://github.com/beauby","followers_url":"https://api.github.com/users/beauby/followers","following_url":"https://api.github.com/users/beauby/following{/other_user}","gists_url":"https://api.github.com/users/beauby/gists{/gist_id}","starred_url":"https://api.github.com/users/beauby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauby/subscriptions","organizations_url":"https://api.github.com/users/beauby/orgs","repos_url":"https://api.github.com/users/beauby/repos","events_url":"https://api.github.com/users/beauby/events{/privacy}","received_events_url":"https://api.github.com/users/beauby/received_events","type":"User","site_admin":false},"created_at":"2015-11-07T19:18:50Z","updated_at":"2015-11-07T19:18:50Z","body":"@bf4 Should we put `Relationship`, `Resource`, `ResourceIdentifier` etc. inside `ApiObjects` or should we get rid of `ApiObjects`?"}}