@staticmethod
    def _decode_data(field, value):

        if field.type == "string" or \
           field.type == "string" or  \
           field.type == "password" or \
           field.type == "upload" or \
           field.type == "text":
            return value
        elif field.type == "integer" or \
             field.type == "id":
            return int(value)
        elif field.type == "double" or \
             field.type == "decimal":
            return float(value)
        elif field.type == "boolean":
            if value and not str(value)[:1].upper() in ["F", "0"]:
                return "T"
            else:
                return "F"
        elif field.type == "date":
            return value # @todo fix this to get a date
        elif field.type == "time":
            return value # @todo fix this to get a time
        elif field.type == "datetime":
            return value # @todo fix this to get a datetime
        else:
            return value

    # -------------------------------------------------------------------------
publish a message.
dataset/ETHPy150Open sahana/eden/modules/s3/s3import.py/S3Importer._decode_data--crossover with--dataset/ETHPy150Open agoragames/haigha/haigha/classes/basic_class.py/BasicClass.publish