    # File lib/merb-core/dispatch/session/cookie.rb, line 127
        def to_cookie
          unless self.empty?
            data = self.serialize
            value = Merb::Parse.escape "#{data}--#{generate_digest(data)}"
            if value.size > MAX
              msg = "Cookies have limit of 4K. Session contents: #{data.inspect}"
              Merb.logger.error!(msg)
              raise CookieOverflow, msg
            end
            value
          end
        end