Adding the id to parseRequest and parseResponse

The id is needed when writing a server implementation. This is a proposal, you may want to improve on it. I just ignored the id in the unit tests: I don't know if you want to enhance them.