def jimfile_to_json
      h = {
        "bundle_dir" => bundle_dir
      }.merge(options)
      h['bundles'] = {}
      self.bundles.each do |bundle_name, requirements|
        h['bundles'][bundle_name] = []
        requirements.each do |name, version|
          h['bundles'][bundle_name] << if version.nil? || version.strip == ''
            name
          else
            [name, version]
          end
        end
      end
      Yajl::Encoder.encode(h, :pretty => true)
    end
def jimfile_to_json
      h = {
        "bundle_dir" => bundle_dir
      }.merge(options)
      h['bundles'] = {}
      self.bundles.each do |bundle_name, requirements|
        h['bundles'][bundle_name] = []
        requirements.each do |name, version|
          h['bundles'][bundle_name] << if version.nil? || version.strip == ''
            name
          else
            [name, version]
          end
        end
      end
      Yajl::Encoder.encode(h, :pretty => true)
    end
Output the parse Jimfile requirements and options as a Jimfile-ready
 JSON-encoded string