Partially implemented string serialization/deserialization problem, the most difficult part seems to have to be implemented with a finite state machine.