Answer the question
In order to leave comments, you need to log in
How to parse yaml in c# and convert it to json or some kind of array?
Tried using YamlDotNet but it didn't help. Although everywhere it is sent to him. I didn't even understand how to use it.
I found an example on the Internet for converting YAML to Json.NET, but I did not understand how to get json itself.
String StringFile = File.ReadAllText(FileName);
StringReader FileYaml = new StringReader(StringFile);
var deserializer = new Deserializer();
var yamlObject = deserializer.Deserialize(FileYaml);
var serializer = new Newtonsoft.Json.JsonSerializer();
serializer.Serialize(Console.Out, yamlObject);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question