When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value. As an additional bonus, both formats are easily human-readable and editable with a common text editor, which is really comfortable for testing and debugging. From the programming point of view: There are mature libraries available for either for most programming languages, so no need to write your own string parser.
Which one you choose is subjective. Personally I prefer JSON over XML because I consider XML to be quite over-engineered for most use-cases (my examples show almost everything JSON has to offer but only scratch the surface of the features of XML), but that's just my opinion.
There are mature libraries available for either for most programming languages, so there is no need to fiddle around with string operations. The .NET framework has both an XML library and a JSON library.