Serialize a string like the quoted string array in JSON, and implement a finite state machine to parse the serialized strings (deserializing).