more serialization implementation

I went with this aproach because of the function signature of appendOneOption. Anyway the $result state is necessary, because something always needs to know if a space needs to be appended first. I can move that to a property.

Yes the return value makes no sense.