iam new to how to use .yaml my requirement is i need to read yaml and use the data in process yaml should work as dictionary as we are considering that as config file for me how can i achieve that
Hello @bpt.teja1996!
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
-
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution. -
Topic that contains most common solutions with example project files can be found here.
-
Read our official documentation where you can find a lot of information and instructions about each of our products:
-
Watch the videos on our official YouTube channel for more visual tutorials.
-
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
Cheers from your friendly
Forum_Staff
Hi,
You can first, convert it to a Newtonsoft Json (JObject) and then, do your stuff
// convert string/file to YAML object
var r = new StreamReader(filename);
var deserializer = new Deserializer(namingConvention: new CamelCaseNamingConvention());
var yamlObject = deserializer.Deserialize(r);
// now convert the object to JSON. Simple!
Newtonsoft.Json.JsonSerializer js = new Newtonsoft.Json.JsonSerializer();
var w = new StringWriter();
js.Serialize(w, yamlObject);
string jsonText = w.ToString();
Regards