I am very new to yaml file reading and writing , In most of the sites Deserialization and serialization is used for reading and writing and we need to define an object If we want to serialize & deserialize. but I have below file to add a yaml node but the structure not fixed So please help me to add a node in c# with in an yaml file.
I/p File
mescue_path: &mescue_path test/profile
fescue_path: &fescue_path details/prod
mescue_path_server: &mescue_path_server
role: auto
prefix: *mescue_path
fescue_path_server: &fescue_path_server
role: auto
prefix: *fescue_path
westRr: &westRr
<<: *mescue_path_server
rack: westRr
eastRr: &eastRr
<<: *mescue_path_server
rack: estRr
Mapping:
mechinerack1: *eastRack
mechinerack2: *eastRack
mechinerack3: *eastRack
mechinerack4: *eastRack
RRRack1: *westRack
RRRack2: *WestRack
O/P File:
mescue_path: &mescue_path test/profile
fescue_path: &fescue_path details/prod
mescue_path_server: &mescue_path_server
role: auto
prefix: *mescue_path
fescue_path_server: &fescue_path_server
role: auto
prefix: *fescue_path
westRr: &westRr
<<: *mescue_path_server
rack: westRr
*NorthRr: &NorthRr
<<: *mescue_path_server
rack: NorthRr*
eastRr: &eastRr
<<: *fescue_path_server
rack: estRr
Mapping:
mechinerack1: *eastRack
mechinerack2: *eastRack
mechinerack3: *eastRack
mechinerack4: *eastRack
RRRack1: *westRack
RRRack2: *WestRack