'Convert a value to a string representation suitable for persisting'

def to_json(self, value, app, use_security):

    if (value is None):
        rval = ''
    else:
        rval = util.smart_str(value)
    return rval
