lib/legion/json.rb in legion-json-0.1.0 vs lib/legion/json.rb in legion-json-0.1.1
- old
+ new
@@ -11,12 +11,15 @@
# loaded for the current platform.
#
# @return [Object] parser.
def setup!
if RUBY_ENGINE == 'jruby'
+ require 'jrjackson'
require 'legion/json/jrjackson'
@parser = Legion::JSON::JrJackson.new
else
+ require 'oj'
+ Oj.default_options = { mode: :compat }
require 'legion/json/oj'
@parser = Legion::JSON::Oj.new
end
end