Sha256: e78a36459e111b56ddfcb2c614e13f7331b03c6334437bbaa2a59f1a21a724b1

Contents?: true

Size: 457 Bytes

Versions: 66

Compression:

Stored size: 457 Bytes

Contents

require 'yajl' unless defined?(::Yajl)
require 'multi_json/adapter'

module MultiJson
  module Adapters
    # Use the Yajl-Ruby library to dump/load.
    class Yajl < Adapter
      ParseError = ::Yajl::ParseError

      def load(string, options={})
        ::Yajl::Parser.new(:symbolize_keys => options[:symbolize_keys]).parse(string)
      end

      def dump(object, options={})
        ::Yajl::Encoder.encode(object, options)
      end
    end
  end
end

Version data entries

66 entries across 64 versions & 10 rubygems

Version Path
multi_json-1.7.9 lib/multi_json/adapters/yajl.rb
multi_json-1.7.8 lib/multi_json/adapters/yajl.rb
challah-1.0.0 vendor/bundle/gems/multi_json-1.7.7/lib/multi_json/adapters/yajl.rb
swipe-rails-0.0.5 vendor/bundle/gems/multi_json-1.7.7/lib/multi_json/adapters/yajl.rb
multi_json-1.7.7 lib/multi_json/adapters/yajl.rb
multi_json-1.7.6 lib/multi_json/adapters/yajl.rb
multi_json-1.7.5 lib/multi_json/adapters/yajl.rb
multi_json-1.7.4 lib/multi_json/adapters/yajl.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
vagrant-shell-0.2.6 vendor/bundle/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
challah-1.0.0.beta3 vendor/bundle/gems/multi_json-1.7.3/lib/multi_json/adapters/yajl.rb
challah-1.0.0.beta3 vendor/bundle/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/multi_json-1.7.3/lib/multi_json/adapters/yajl.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/multi_json-1.7.3/lib/multi_json/adapters/yajl.rb
vagrant-shell-0.2.5 vendor/bundle/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
multi_json-1.7.3 lib/multi_json/adapters/yajl.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
challah-1.0.0.beta2 vendor/bundle/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb
challah-1.0.0.beta vendor/bundle/gems/multi_json-1.7.2/lib/multi_json/adapters/yajl.rb