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