Converts a YAML file to JSON format.
The following table describes the parameters of the YamlToJson
task.
Parameter | Description |
---|---|
YamlInputFile |
Required String parameterThe input YAML file name to convert. |
JsonOutputFile |
Required String parameterThe output JSON file name. |
WithIndentation |
Optional Boolean parameterIndicates if the JSON file to generate must indented. The default value is true . |
The following example uses the YamlToJson
task to converts the Api.yaml
YAML file
to Api.json
JSON file with no indentation.
<Project>
<Target Name="ConvertToJson">
<YamlToJson YamlInputFile="Api.yaml" JsonOutputFile="Api.json" />
</Target>
</Project>