Parse one String data using C#
- by skumar
I need to parse the following string data and convert it into the specified C# class object.
Please suggest me a solution for this:
Input string: A||B||C
Output: Class containing a list of 3 objects of type string i.e A, B, C
Input String: A||{a1||a2||a3}||B||C
Output: Class containing a list of 3 elements i.e A, B, C and inside A having one more List with 3 elements i.e a1, a2, a3. Here elements inside brace symbol { .. } would represent the child elements.
Note: Child elements could have again multiple child elements.
Please help me on this.