<div dir="ltr">Use a library for converting Erlang terms to JSON.<div><br></div><div>Jiffy: <a href="https://github.com/davisp/jiffy">https://github.com/davisp/jiffy</a><br></div><div>JSX: <a href="https://github.com/talentdeficit/jsx">https://github.com/talentdeficit/jsx</a><br></div><div><br></div><div>For JSX, you could do the following:</div>







<p class="p1"><span class="s1">Payload = [{<<"rrsets">>, [{<<"name">>, <<"<a href="http://xxx.gl">xxx.gl</a>">>}, {<<"type">>, <<"A">>}, {<<"changetype">>, <<"REPLACE">>}, {<<"records">>, [{<<"content">>, <<"2.1.1.1">>}, {<<"disabled">>, false}, {<<"name">>, <<"<a href="http://xxx.gl">xxx.gl</a>">>}, {<<"ttl">>, <<"3600">>}, {<<"type">>, <<"A">>}, {<<"priority">>, <<"0">>}]}]}],<br>Options = [],</span></p><p class="p1">Json = jsx:encode(Payload),</p><p class="p1"><span class="s1">{ok, StatusCode, RespHeaders, ClientRef = hackney:request(</span><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Method, URL, Headers, Json, Options). </span></p><p class="p1">Side-note: maybe you could make a PR to erlcloud (<a href="https://github.com/gleber/erlcloud">https://github.com/gleber/erlcloud</a>) to get Route53 support in? :)</p></div>