Generate json in the view, not in the MediaView