Maybe you can do a simpler thing: for each data structure create a "scenario" structure filled with commands for saving/ loading it.

Like "Write from field a to field b", "write field c as a string", 'write from field d to the end" - something like this. Both simple and effective.

Or just use additional routine that will treat the strings separately.