{"action":"opened","issue":{"url":"https://api.github.com/repos/schmittjoh/serializer/issues/476","labels_url":"https://api.github.com/repos/schmittjoh/serializer/issues/476/labels{/name}","comments_url":"https://api.github.com/repos/schmittjoh/serializer/issues/476/comments","events_url":"https://api.github.com/repos/schmittjoh/serializer/issues/476/events","html_url":"https://github.com/schmittjoh/serializer/issues/476","id":97994055,"number":476,"title":"[Question] Handler/Converter for specific field","user":{"login":"unusorin","id":1003231,"avatar_url":"https://avatars.githubusercontent.com/u/1003231?v=3","gravatar_id":"","url":"https://api.github.com/users/unusorin","html_url":"https://github.com/unusorin","followers_url":"https://api.github.com/users/unusorin/followers","following_url":"https://api.github.com/users/unusorin/following{/other_user}","gists_url":"https://api.github.com/users/unusorin/gists{/gist_id}","starred_url":"https://api.github.com/users/unusorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unusorin/subscriptions","organizations_url":"https://api.github.com/users/unusorin/orgs","repos_url":"https://api.github.com/users/unusorin/repos","events_url":"https://api.github.com/users/unusorin/events{/privacy}","received_events_url":"https://api.github.com/users/unusorin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-29T17:59:16Z","updated_at":"2015-07-29T17:59:16Z","closed_at":null,"body":"Hi,\r\nI'm trying to use hashids for converting a specific field to a hashid (using doctrine2 entities).\r\nMy game plan is to use a interface called `HashidInterface` that certain entities will implement, and when an object hits the serializer a specific field should be serialized with a different value (ex: 5 => 21kj1)\r\nThe quick solution would be to use a virtual property, but then I don't want to inject the service that will handle this conversion into an entity. \r\n\r\nI've looked at handlers part and it doesn't quite match what I need, because it's doesn't support interfaces as type and I'll have to handle the serialization of the entire object, which is overkill for this simple task. \r\n\r\nCan someone point me to a solution at this problem ? I've crawled the docs but it lacks examples. \r\n\r\nThanks,\r\nSorin!"}}