Handle serialization/deserialization ourselves

cURL can't be trusted to do this, since it doesn't deal with nested arrays.

Fixes #35, see #33