module ViewModel::Controller
def wrap_json_view(view)
def wrap_json_view(view) case view when Array view.map { |v| wrap_json_view(v) } when Hash view.transform_values { |v| wrap_json_view(v) } when String, Symbol CompiledJson.new(view) else view end end