|
Oj.default_options = { :mode => :compat, :time_format => :ruby, :use_to_json => true } |
This line causes a lot of trouble for anyone using Oj and requiring rabl after having set Oj themselves:
Oj.default_options = my = { mode: :strict }
require "rabl"
Oj.default_options != my
Oj has its share of responsibility on that, however, IMHO the bug comes from rabl.
I'd love to fix it by using MultiJson, yet I came across one of your commits removing it (9bfb1a4).
Another option may be to have a condition in the format_json method, but I'm not a big fan..
rabl/lib/rabl/configuration.rb
Line 22 in 02b3464
This line causes a lot of trouble for anyone using
Ojand requiringrablafter having setOjthemselves:Ojhas its share of responsibility on that, however, IMHO the bug comes from rabl.I'd love to fix it by using MultiJson, yet I came across one of your commits removing it (9bfb1a4).
Another option may be to have a condition in the
format_jsonmethod, but I'm not a big fan..