---
title: "init(for:contentType:)"
framework: coretransferable
role: symbol
role_heading: Initializer
path: "coretransferable/codablerepresentation/init(for:contenttype:)"
---

# init(for:contentType:)

Creates a transfer representation for a given type and type identifier.

## Declaration

```swift
init(for itemType: Item.Type = Item.self, contentType: UTType) where Encoder == JSONEncoder, Decoder == JSONDecoder
```

## Parameters

- `itemType`: The concrete type of the item that’s being transferred.
- `contentType`: A uniform type identifier that best describes the item.

## Discussion

Discussion This initializer uses JSON for encoding and decoding.

## See Also

### Creating a transfer representation

- [init(for:contentType:encoder:decoder:)](coretransferable/codablerepresentation/init(for:contenttype:encoder:decoder:).md)
