docs: def serializeFields(obj, order=None):
      """
      Turn an object's fields into a ';' and ',' seperated string.
  
      If order is None, obj should be a list, backslash escape each field and
      return a ';' separated string.
      """
      fields = []
      if order is None:
          fields = [backslashEscape(val) for val in obj]
      else:
          for field in order:
              escapedValueList = [backslashEscape(val) for val in
                                  toList(getattr(obj, field))]
              fields.append(','.join(escapedValueList))
      return ';'.join(fields)