Closed luw2007 closed 8 years ago
when i use logstash-output-mongodb, I got a error.
“options”=>{“amount”=>#<BigDecimal:4e9c3448,’0.951E2’,3(4)> ... “/logstash-2.1.0/vendor/bundle/jruby/1.9/gems/bson-3.2.6-java/lib/bson/hash.rb:43:in `to_bson’”
The cause of jrjackson deault options: use_bigdecimal is true. I hacked the json.rb like this
use_bigdecimal
true
logstash-codec-json/lib/logstash/codecs/json.rb +42 - decoded = LogStash::Json.load(data) + decoded = LogStash::Json.load(data, {:use_bigdecimal=>false})
So, Can I have some custom options of the jrjackson.
The correct fix would be to patch BigDecimal etc to have a to_bson method in the mongodb output. See: https://github.com/logstash-plugins/logstash-output-mongodb/issues/18
when i use logstash-output-mongodb, I got a error.
The cause of jrjackson deault options:
use_bigdecimal
istrue
. I hacked the json.rb like thisSo, Can I have some custom options of the jrjackson.