moved JSON views to a controller trait