From de617921d9d510a5d73ca48ad5ad601c7f7173da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cruz?= Date: Fri, 5 Aug 2016 11:50:24 +0100 Subject: [PATCH] Ensure strict mode is used for Oj parser. --- lib/fluent/plugin/parser_json.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/plugin/parser_json.rb b/lib/fluent/plugin/parser_json.rb index 97e9b1e0fd..b4b5663a4c 100644 --- a/lib/fluent/plugin/parser_json.rb +++ b/lib/fluent/plugin/parser_json.rb @@ -39,7 +39,7 @@ def configure(conf) begin raise LoadError unless @json_parser == 'oj' require 'oj' - Oj.default_options = {bigdecimal_load: :float} + Oj.default_options = {bigdecimal_load: :float, mode: :strict} @load_proc = Oj.method(:load) @error_class = Oj::ParseError rescue LoadError