Skip to content

justindbelanger/ConvertYamlToJson

Repository files navigation

Motivation

Primary

This script demonstrates converting YAML files to JSON files.

Secondary

It also demonstrates executing C# code as a script! How awesome is this? Checkout ScriptCS for one popular tool for C# scripting. Also–and perhaps more importantly–there’s a tool that is built into the .NET Framework, csi.exe, that allows interactively scripting in C#.

Usage

ScriptCS

If you want to use ScriptCS, just install it (perhaps via Chocolatey), then run

scriptcs ConvertYamlToJson.csx -- "FileName.yaml"

csi.exe

For csi.exe, you must first run

.\restore_packages.ps1

once to restore NuGet packages, then you can run

csi ConvertYamlToJson.csx "FileName.yaml"

You might have to ensure NuGet and/or some other tools are installed system-wide, first.

About

Demonstrate scripting with C# and converting YAML to JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published