# Floating Point Numbers in JSON

**URL:** <https://forum.katalon.com/t/floating-point-numbers-in-json/12129>\
**Category:** Web Testing\
**Tags:** katalon-recorder\
**Created:** [July 19, 2018, 4:59am UTC](https://forum.katalon.com/t/floating-point-numbers-in-json/12129 "2018-07-19T04:59:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefan\_Schnell](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Stefan\_Schnell](https://forum.katalon.com/u/Stefan_Schnell)\
**Post date:** [July 19, 2018, 4:59am UTC](https://forum.katalon.com/t/floating-point-numbers-in-json/12129/1 "2018-07-19T04:59:40Z")

</div>

Hello Developer Team,

today I tried different targets like id, css and xpath with Katalon Automation Recorder 3.5.8 in my test case and I see that floating point numbers from the JSON file not be fully transfered in the HTML field, only the decimal places.

Here an example:

```auto
   { "MANDT":"001", "CARRID":"AA", "CONNID":17, "FLDATE":"2004-11-10", "PRICE":422.94, "CURRENCY":"USD", "PLANETYPE":"747-400", "SEATSMAX":385, "SEATSOCC":375, "PAYMENTSUM":192717.09, "SEATSMAX_B":31, "SEATSOCC_B":31, "SEATSMAX_F":21, "SEATSOCC_F":19 },

```

The price and the paymentsum delivers only the decimal places:

I changed my HTML code, I add steps:

```auto
<td>PRICE:</td><td><input type="number" name="price" id="price" step="0.01"></td>

```

But without any effect.

The variables are setting correct:

Could it be possible that there is a bug in the JSON processing with floating point numbers or is there something wrong with my definition?

Thank you very much for your support.

Best regards  
Stefan

[katalon\_recorder\_json\_floating\_point.jpg](https://s3.amazonaws.com/katalon-forum/editor/mn/b6hsk0zcw345.jpg)

[katalon\_recorder\_json\_floating\_point\_2.jpg](https://s3.amazonaws.com/katalon-forum/editor/ub/i9oxqwbnqxvx.jpg)

---

<div class="post-metadata">

**Author:** ![Stefan\_Schnell](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Stefan\_Schnell](https://forum.katalon.com/u/Stefan_Schnell)\
**Post date:** [July 19, 2018, 5:36am UTC](https://forum.katalon.com/t/floating-point-numbers-in-json/12129/2 "2018-07-19T05:36:25Z")

</div>

Hello,

I found the solution. It is necessary to use setText command instead of type command for floating point numbers.

The FAQ says:  
**For input elements with type=**"\*\*number", you have to use “setText” to set negative values.  
\*\*  
My suggestion to complete it with:  
**For input elements with type=**"\*\*number", you have to use “setText” to set negative values and floating point values.  
\*\*  
Thanks and best regards  
Stefan
