Serializer

Write serialisable classes
"for" cycle gets each object in array, serialisation of object is write in "append", then "while" cycle adds array name with index to each line in "append". what should I do with it?