Encoding getwork body into JSON for replies.