# How to avoid using BigDecimal scientific data format

**URL:** <https://discuss.elastic.co/t/how-to-avoid-using-bigdecimal-scientific-data-format/71712>\
**Category:** Logstash\
**Created:** [January 16, 2017, 10:17am UTC](https://discuss.elastic.co/t/how-to-avoid-using-bigdecimal-scientific-data-format/71712 "2017-01-16T10:17:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgiana.ciuchi](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@georgiana.ciuchi](https://discuss.elastic.co/u/georgiana.ciuchi)\
**Post date:** [January 16, 2017, 10:17am UTC](https://discuss.elastic.co/t/how-to-avoid-using-bigdecimal-scientific-data-format/71712/1 "2017-01-16T10:17:21Z")

</div>

I am using Logstash 1.5.5, Kafka as input using JSON codec, a structured message is received by Logstash:  
{  
"app\_id" ": "myapp"  
......  
"log\_message": {  
"id": "1234",  
"code": "whatever",  
"amount": 284.84  
}  
}

I am converting log\_message to String using JSON.dump like this:  
string\_message = JSON.dump event["log\_message"];

string\_message obtained value is {"id": "1234", "code": "whatever","amount": "0.28484E3"}

There is a way to avoid this transformation to scientific format of BigDecimal into string\_message? I need to preserve amount value as 284.84

that log\_message JSON message value is variable as structure, decimal values could be present on several message levels with variable attribute name.

There is a way to have a global setting about what decimal format should be used?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 13, 2017, 10:17am UTC](https://discuss.elastic.co/t/how-to-avoid-using-bigdecimal-scientific-data-format/71712/2 "2017-02-13T10:17:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
