Jack Nagel 997f9d0075 Update multi_json to 1.5.0
This contains updates to the OkJson library that allow objects to define
to_json for serialization, and this will be used in the upcoming options
and deps work.
2013-01-17 21:39:43 -06:00

19 lines
446 B
Ruby

require 'yajl' unless defined?(::Yajl)
module MultiJson
module Adapters
# Use the Yajl-Ruby library to dump/load.
class Yajl
ParseError = ::Yajl::ParseError
def self.load(string, options={}) #:nodoc:
::Yajl::Parser.new(:symbolize_keys => options[:symbolize_keys]).parse(string)
end
def self.dump(object, options={}) #:nodoc:
::Yajl::Encoder.encode(object, options)
end
end
end
end