Allow lists to be serialized to JSON too.

Reponse.json was only serializing Maps. I added a check for Lists too.