---
schema_version: "1"
id: 74d38f9fd6adcc1c95168a60485d9c85b7d2722c8e9d3f1ddba4755a93b9eee8
title: "Flow Designer でのカスタムデータ型:page-support-status: eolScheduled"
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/design-center/fd-custom-data-types.md
canonical_url: https://docs.mulesoft.com/jp/design-center/fd-custom-data-types
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 963ef291f6f85bcfab4f1b208563772175c2a73374e32b66bfb9a9090b0d7b08
description: MuleSoft Documentation Site
latest: true
---
# Flow Designer でのカスタムデータ型:page-support-status: eolScheduled

カスタムデータ型を CSV、JSON、Java オブジェクト、XML のいずれかの形式で作成できます。カスタムデータ型は、キー - 値ペアまたは XML として構成されます。これに含まれる値はシンプルデータ型です。

<table>
<tbody><tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>カードの入力として必要とされるカスタムデータ型が、前のカードで出力として作成されるカスタムデータ型とは異なる場合があります。この状況では、この 2 つのカード間に Transform カードを配置する必要があります。Transform カードでは、カスタムデータ型の要素を別のカスタムデータ型の要素にマップする方法を Flow Designer に説明することができます。​<a href="https://docs.mulesoft.com/jp/design-center/fd-transform" class="xref page">「入力データへの出力データのマッピング」</a>​を参照してください。</p>
</div>
</td>
</tr>
</tbody></table>

CSV

データはカンマ区切り値としてカードに入ることができます。このデータ形式は、スプレッドシートのコンテンツをエクスポートする場合によく使用されます。Flow Designer でカスタムデータ型に対してこの形式を使用する場合、REST API Modeling Language (RAML) のスキーマを提供し、データ型をどのように解釈するかを Flow Designer に説明する必要があります。次に、簡単なスキーマの例を示します。

#%RAML 1.0 DataType
type: array
items:
    properties:
        firstname:
            type: string
        lastname:
            type: string
        age:
            type: number

JSON

JavaScript Object Notatation (JSON) はデータをキー - 値ペアで構成する形式です。この形式を使用する場合、サンプルデータを含む例か、データ型の基礎となる JSON スキーマを提供する必要があります。

JSON スキーマの例

{
  "$id": "https://example.com/person.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Person",
  "type": "object",
  "properties": {
    "firstName": {
      "type": "string",
      "description": "The person's first name."
    },
    "lastName": {
      "type": "string",
      "description": "The person's last name."
    },
    "age": {
      "description": "Age in years which must be equal to or greater than zero.",
      "type": "integer",
      "minimum": 0
    }
  }
}

スキーマに基づく JSON ファイルの例

{
  "firstName": "Olafur",
  "lastName": "Karlsson",
  "age": "45"
}

Object

この形式は Java オブジェクトです。Flow Designer でこの形式を使用する場合、REST API Modeling Language (RAML) のスキーマを提供し、データをどのように解釈するかを Flow Designer に説明する必要があります。次に、簡単なスキーマの例を示します。

#%RAML 1.0 DataType
type: object
properties:
    field1:
        type: string
    field2:
        properties:
            field21:
                type: string
            field22:
                type: string

XML

XML はタグ間でデータを構成する形式です。この形式を使用する場合、サンプルデータを含む例か、データ型の基礎となる JSON スキーマを提供する必要があります。

XML スキーマの例

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="person">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element type="xs:string" name="firstName"/>
        <xs:element type="xs:string" name="lastName"/>
        <xs:element type="xs:byte" name="age"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

スキーマに基づく XML ファイルの例

<person>
  "<firstName>Olafur</firstName>
  <lastName>Karlsson</lastName>
  <age>45</age>
</person>

## [](#関連情報)関連情報

- [フローでのデータ型の定義および使用](https://docs.mulesoft.com/jp/design-center/about-data-types)
- [Flow Designer でサポートされるシンプルデータ型](https://docs.mulesoft.com/jp/design-center/fd-supported-simple-data-types)