# Function json

- json<Data>(data, init?): Response

- This is a shortcut for creating `application/json` responses. Converts `data` to JSON and sets the `Content-Type` header.

  #### Type Parameters

  - Data

  #### Parameters

  - data: Data
  - `Optional` init: number | ResponseInit

  #### Returns Response

  - Defined in common/temp/node_modules/.pnpm/@remix-run+router@1.16.1/node_modules/@remix-run/router/dist/utils.d.ts:452