json.array!(@hosts) do |host| json.extract! host, :id, :name, :uri json.url host_url(host, format: :json) end