Use json encoded put in tests

Slightly more readiable and probably closer to how we'll be using the api