Transforming to or from JSON for Symfony2 REST-Controller