# File lib/yajl/json_gem/encoding.rb, line 20
  def self.generate(obj, opts=nil)
    opts ||= {}
    options_map = {}
    if opts.has_key?(:indent)
      options_map[:pretty] = true
      options_map[:indent] = opts[:indent]
    end
    Yajl::Encoder.encode(obj, options_map)
  rescue Yajl::EncodeError => e
    raise JSON::GeneratorError, e.message
  end