オーダーされた構造

この要素は、 熱 意/ヘルプ/ zest -仕様ファイル/構造/導入/"> を構造体のグループ内の設定されたインデックスで指定します。

可能な場所

  • 熱 意/ヘルプ/ zest -仕様ファイル/構造/プロパティ/導入/">プロパティ

情報:

順序付けされた構造物の可能な場所は、 ** 熱 意/ヘルプ/ zest -仕様ファイル/構造/プロパティ/導入/"> ** データ型 コレクター.

子要素

  • 熱意 /ヘルプ/ -仕 zest 様ファイル/構造/導入/">構造 必須 繰り返し

サンプル

シンプル

私たちは、旅行者のリソースで、あなたが作成したと言おう 熱 意/ヘルプ/ zest -仕様ファイル/構造/プロパティ/導入/"> 呼び出し 旅行者名 あなたが望むもの、

copy

0th index: title
 1st index: first_name
 2nd index: last_name

以下は、プロパティとその値のサンプル json 本体です。

copy

{
 "travelers": [
 {
 "traveler_name": [
 "Mr",
 "John",
 "Doe"
 ]
 }
 ]
 }

したがって、各キーは 旅行者名 a の文字列を表す必要があります。 熱 意/ヘルプ/ zest -仕様ファイル/構造/導入/"> . a を使用することはできません。 熱 意/ヘルプ/ zest -仕様ファイル/構造グループ/導入/"> それは文字列の順序を維持しないからです。次に、この要件を達成するために、以下に示すように順序付けされた構造を使用します。

copy

<property name="traveler_name" type="collections">
 <ordered-structures>
 <structure>
 <property type="string" values="Mr,Miss,Mrs">
 <description> Provide any one of the titles from the possible values. </description>
 </property>
 </structure>
 <structure>
 <property type="string" regex="^[^\s]+$">
 <description> Provide your first name without any space. </description>
 </property>
 </structure>
 <structure>
 <property type="string" length="1,-1">
 <description> The last name should contain a minimum of one character. </description>
 </property>
 </structure>
 </ordered-structures>
 </property>

ここでは、これらの子プロパティには名前属性がないため、構造体はデフォルトのマップ プロパティには開かれません。

複合体

同じユースケースでは、 旅行者名 上記で説明したように、姓は旅行者の家族名またはエイリアス名を示すことができます。 この要件では、 熱 意/ヘルプ/ zest -仕様ファイル/構造/導入/"> 2 番目のインデックスで指定したインデックスを削除し、新しい 熱 意/ヘルプ/ zest -仕様ファイル/構造グループ/導入/"> 不動産の下に追加する必要があります。以下は、旅行者名の下に追加する必要がある構造グループです。

copy

<structure-group name="family/alias" type="one-of">
 <structure name="family_name">
 <property type="string">
 <description> Provide your family name. </description>
 </property>
 </structure>
 <structure name="alias">
 <property type="string" regex="^alias ([a-zA-Z\s]+)$">
 <description> Provide your nick name, if you have any. </description>
 </property>
 </structure>
 </structure-group>

この要件のための順序付けされた構造は次のとおりです。

copy

<property name="traveler_name" type="collections">
 <ordered-structures>
 <structure>
 <property type="string" values="Mr,Miss,Mrs">
 <description> Provide any one of the titles from the possible values. </description>
 </property>
 </structure>
 <structure>
 <property type="string" regex="^[^\s]+$">
 <description> Provide your first name without any space. </description>
 </property>
 </structure>
 </ordered-structures>
 <structure-group name="family/alias" type="one-of">
 <structure name="family_name">
 <property type="string">
 <description> Provide your family name. </description>
 </property>
 </structure>
 <structure name="alias">
 <property type="string" regex="^alias ([a-zA-Z\s]+)$">
 <description> Provide your nick name, if you have any. </description>
 </property>
 </structure>
 </structure-group>
 </property>

Last Updated 2026-02-06 15:55:45 +0530 IST