Added a generic controller for getting JSON data

This method is needed for the sexycalendar module.