lib/freddy/payload.rb in freddy-jruby-1.0.0 vs lib/freddy/payload.rb in freddy-jruby-1.3.2

- old
+ new

@@ -20,15 +20,18 @@ def self.json_handler @_json_handler ||= defined?(Oj) ? OjAdapter : JsonAdapter end class OjAdapter + PARSE_OPTIONS = { symbol_keys: true } + DUMP_OPTIONS = { mode: :compat, time_format: :xmlschema, second_precision: 6 } + def self.parse(payload) - Oj.strict_load(payload, symbol_keys: true) + Oj.strict_load(payload, PARSE_OPTIONS) end def self.dump(payload) - Oj.dump(payload, mode: :compat, time_format: :xmlschema) + Oj.dump(payload, DUMP_OPTIONS) end end class JsonAdapter def self.parse(payload)