breakout json doctrine controller for better testing and extendability