def parse_sections(sections_desc)
      require "json"

      sections_desc = sections_desc.to_json if sections_desc.class == Hash

      begin
        sections_json = JSON.parse(sections_desc)
      rescue JSON::ParserError => e
        raise "There was a problem parsing your JSON string for sections: #{e}"
      end

      sections_json.collect do |name, v|
        Section.new(name: name.to_s, prefix: v["prefix"], labels: v["labels"], options: @options)
      end
    end
def parse_sections(sections_desc)
      require "json"

      sections_desc = sections_desc.to_json if sections_desc.class == Hash

      begin
        sections_json = JSON.parse(sections_desc)
      rescue JSON::ParserError => e
        raise "There was a problem parsing your JSON string for sections: #{e}"
      end

      sections_json.collect do |name, v|
        Section.new(name: name.to_s, prefix: v["prefix"], labels: v["labels"], options: @options)
      end
    end
Turns the argument from the commandline of --configure-sections or
 --add-sections into an array of Section objects.

 @param [String, Hash] sections_desc Either string or hash describing sections
 @return [Array] Parsed section objects.