Use json encoded put in tests

Slightly more readiable and probably closer to how we'll be using the api
Merge pull request #373 from gannetson/json-encoded-put

Use json encoded put in tests