'Value parser for the hidden input field of the widget
@param value: the value received from the client, JSON string
@return: a list (if multiple=True) or the value'

def parse(self, value):

    default = ([] if self.multiple else None)
    if (value is None):
        return (None, None)
    try:
        value = json.loads(value)
    except ValueError:
        return (default, None)
    if ((not self.multiple) and isinstance(value, list)):
        value = (value[0] if value else None)
    return (value, None)
