{"action":"created","issue":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/3912","labels_url":"https://api.github.com/repos/Sylius/Sylius/issues/3912/labels{/name}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/3912/comments","events_url":"https://api.github.com/repos/Sylius/Sylius/issues/3912/events","html_url":"https://github.com/Sylius/Sylius/issues/3912","id":127292343,"number":3912,"title":"[RFC][ApiBundle] Sparse Fieldsets ","user":{"login":"umpirsky","id":208957,"avatar_url":"https://avatars.githubusercontent.com/u/208957?v=3","gravatar_id":"","url":"https://api.github.com/users/umpirsky","html_url":"https://github.com/umpirsky","followers_url":"https://api.github.com/users/umpirsky/followers","following_url":"https://api.github.com/users/umpirsky/following{/other_user}","gists_url":"https://api.github.com/users/umpirsky/gists{/gist_id}","starred_url":"https://api.github.com/users/umpirsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umpirsky/subscriptions","organizations_url":"https://api.github.com/users/umpirsky/orgs","repos_url":"https://api.github.com/users/umpirsky/repos","events_url":"https://api.github.com/users/umpirsky/events{/privacy}","received_events_url":"https://api.github.com/users/umpirsky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Sylius/Sylius/labels/Enhancement","name":"Enhancement","color":"02d7e1"},{"url":"https://api.github.com/repos/Sylius/Sylius/labels/Feature%20Request","name":"Feature Request","color":"02e10c"},{"url":"https://api.github.com/repos/Sylius/Sylius/labels/RFC","name":"RFC","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-18T19:09:18Z","updated_at":"2016-01-18T20:48:16Z","closed_at":null,"body":"Sometimes with bigger numbers of items per page and serialization config which product lots of nested data structures, response time can be more then several seconds and response size can measure in MB.\r\n\r\nWhat would be cool (not sure if possible), is to allow client to request that an endpoint return only specific fields in the response on a per-type basis by including a fields[TYPE] parameter - [sparse fieldsets](http://jsonapi.org/format/#fetching-sparse-fieldsets).\r\n\r\nI would like to know if something like this is supported by REST libraries we use.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/comments/172649435","html_url":"https://github.com/Sylius/Sylius/issues/3912#issuecomment-172649435","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/3912","id":172649435,"user":{"login":"nakashu","id":1550659,"avatar_url":"https://avatars.githubusercontent.com/u/1550659?v=3","gravatar_id":"","url":"https://api.github.com/users/nakashu","html_url":"https://github.com/nakashu","followers_url":"https://api.github.com/users/nakashu/followers","following_url":"https://api.github.com/users/nakashu/following{/other_user}","gists_url":"https://api.github.com/users/nakashu/gists{/gist_id}","starred_url":"https://api.github.com/users/nakashu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nakashu/subscriptions","organizations_url":"https://api.github.com/users/nakashu/orgs","repos_url":"https://api.github.com/users/nakashu/repos","events_url":"https://api.github.com/users/nakashu/events{/privacy}","received_events_url":"https://api.github.com/users/nakashu/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T20:48:16Z","updated_at":"2016-01-18T20:48:16Z","body":"@umpirsky @pjedrzejewski field exclusion should not be hard.\r\n\r\nWorking solution is here: http://jolicode.com/blog/how-to-implement-your-own-fields-inclusion-rules-with-jms-serializer\r\nFor the sake if the site would die, I'll this here also, it the same just formated to answer on stack.\r\nhttp://stackoverflow.com/questions/33126812/symfony-fosrestbundle-show-selected-fields"}}