<div dir="ltr"><div>Have this head scratcher where I apply a float to a KATT parameter but in the request that float have been inflated by a factor of 10 or 100. </div><div><br></div><div>I am wondering whether I am missing something obvious about how to treat floats in katt/jsx/erlang? Or this is a KATT bug?</div><div><br></div><div>Got this minimal test case:</div><div><br></div><div><div>float_test(Config) -></div><div>    File = filename:join([?config(data_dir, Config), "float_test.apib"]),</div><div>    Params = [ {test_float, 1.23}],</div><div>    katt:run(File, Params).</div></div><div><br></div><div>And the contents of float_test.apib:</div><div><br></div><div><div>POST <a href="http://localhost:9999">http://localhost:9999</a></div><div>> Accept: application/json</div><div>> Content-Type: application/json</div><div>> User-Agent: KATT</div><div>{</div><div>    "test": "{{<test_float}}",</div><div>    "reference": 1.23</div><div>}</div><div>< 200</div><div>< Content-Type: application/json</div><div>{}</div></div><div><br></div><div>And this is how the request looks using nc -l 9999</div><div><br></div><div><div>POST / HTTP/1.1</div><div>Accept: application/json</div><div>Content-Type: application/json</div><div>User-Agent: KATT</div><div>Host: localhost:9999</div><div>Content-Length: 43</div><div><br></div><div>{</div><div>    "test": 12.3,</div><div>    "reference": 1.23</div><div>}</div></div><div><br></div><div>As you can see "test_float" have been multiplied by a factor 10.</div><div><br></div><br clear="all"><div><div class="gmail-m_-5417688543492024164gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px">Best regards</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Bjarne Wichmann Bagge Petersen</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Backend Developer<span style="color:rgb(68,68,68);line-height:20.8px;white-space:pre-wrap;font-size:12.8px">, ShopGun</span></div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;word-wrap:break-word;color:rgb(68,68,68);line-height:20.8px"><br></pre><div style="font-size:12.8px"><span style="font-size:12.8px">E: <a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a> </span><br></div><div style="font-size:12.8px"><span style="font-size:12.8px">L: </span><a href="http://dk.linkedin.com/in/bjarnewp" style="font-size:12.8px" target="_blank">dk.linkedin.com/in/bjarnewp</a><br></div><div style="font-size:12.8px"><span style="font-size:12.8px">W: <a href="http://shopgun.com" target="_blank">shopgun.com</a> </span><br></div><div><span style="line-height:20.8px;white-space:pre-wrap;color:rgb(68,68,68);font-size:12.8px">A: Arne Jacobsens Allé 16, Field's, 3rd floor, DK-2300 København S, Denmark</span></div></div></div></div></div></div></div></div>
</div>