json.extract! widget, :id, :web_assembly_code, :created_at, :updated_at json.url widget_url(widget, format: :json)