'Convert a time struct or string to a string.'

def to_json(self, value):

    try:
        result = super(StringOrDate, self).to_json(value)
    except:
        return value
    if (result is None):
        return value
    else:
        return result
