How to convert YAML to JSON?
If you do not need the features of Json.NET, you can also use the Serializer class directly to emit JSON:
// now convert the object to JSON. Simple!
var js = new Serializer(SerializationOptions.JsonCompatible);
var w = new StringWriter();
js.Serialize(w, o);
string jsonText = w.ToString();
You can check two working fiddles here: