Yaml-json-schema
提供:Dev Guides
YAML-JSONスキーマ
JSON schema in YAML is considered as the common denominator of most modern computer languages. It allows parsing JSON files. It is strongly recommended in YAML that other schemas should be considered on JSON schema. The primary reason for this is that it includes key value combination which are user friendly. The messages can be encoded as key and can be used as and when needed.
JSONスキーマはスカラーであり、値がありません。 JSONスキーマのマッピングエントリは、nullが有効として扱われるキーと値のペアの形式で表されます。
例
ヌルのJSONスキーマは次のように表されます-
JSON表現の出力は以下に記載されています-
例
次の例は、ブールJSONスキーマを表します-
以下は、JSON形式で同じための出力です-
例
次の例は、整数のJSONスキーマを表します-
例
JSONスキーマのタグは、次の例で表されます-
以下に示すように、JSON出力を見つけることができます-