---
schema_version: "1"
id: 05ef539d5f9d7e01b08dbd45f28a2462b1ff737a3bd48a5422061e46efc4d766
title: toString
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.8/dw-mime-functions-tostring.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.8/dw-mime-functions-tostring
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 83635673d6aeeda29b94142cf95015d4892767343bc44f9387853d9a04dcddf7
description: MuleSoft Documentation Site
release: "2.8"
latest: false
---
# toString

## [](#tostring1)toString(mimeType: MimeType): String

`MimeType`​ 値を文字列表現に変換します。

_DataWeave バージョン 2.7.0 で導入されました。_

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">型</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>mimeType</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>MimeType</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>String</code>​ に変換する MIME タイプ値。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、​`parameters`​ が含まれない ​`MimeType`​ 値を文字列表現に変換します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
import * from dw::module::Mime
output application/json
---
toString({'type': "application", subtype: "json", parameters: {}})
```

#### [](#出力)出力

```Json
"application/json"
```

### [](#例-2)例

次の例では、​`parameters`​ が含まれる ​`MimeType`​ 値を文字列表現に変換します。

#### [](#ソース-2)ソース

```DataWeave
%dw 2.0
import * from dw::module::Mime
output application/json
---
toString({'type': "multipart", subtype: "form-data", parameters: {boundary: "my-boundary"}})
```

#### [](#出力-2)出力

```Json
"multipart/form-data;boundary=my-boundary"
```