Reconstructing objects from text files?

Hi,

Is there a good way to reconstruct an object from a text file?

I have a method which backs up a quiz object like so:


Quiz
0.4
1.9
Colour of trees is:
####
blue
red
orange
green
4
1.3
Colour of sea is:
####
blue
red
orange
green
1
1.3
Colour of sheep
####
blue
red
white
green
3

////EDIT: Problem sorted

Thanks