Json-encode rest request bodies