require 'oj' unless defined?(::Oj)

module MultiJson
  module Adapters
    # Use the Oj library to dump/load.
    class Oj
      ParseError = SyntaxError

      ::Oj.default_options = {:mode => :compat}

      def self.load(string, options={}) #:nodoc:
        ::Oj.load(string, :symbol_keys => options[:symbolize_keys])
      end

      def self.dump(object, options={}) #:nodoc:
        ::Oj.dump(object, options)
      end
    end
  end
end

require 'oj' unless defined?(::Oj)

module MultiJson
  module Adapters
    # Use the Oj library to dump/load.
    class Oj
      ParseError = SyntaxError

      ::Oj.default_options = {:mode => :compat}

      def self.load(string, options={}) #:nodoc:
        ::Oj.load(string, :symbol_keys => options[:symbolize_keys])
      end

      def self.dump(object, options={}) #:nodoc:
        options.merge!(:indent => 2) if options[:pretty] || options['pretty']
        ::Oj.dump(object, options)
      end
    end
  end
end

Add pretty support to Oj adapter
Add pretty support to Oj adapter

Fixes #51.
