'This is a "constructor" for the FormID class.
Users configure form-ids as JSON objects in the configuration, we need to
parse this here to convert them to FormIDs
:param json_list_item: A user provided python object which we use to build
the FormIDMatcher
:return: A FormIDMatcher object'

@classmethod
def from_json_list_data(cls, json_list_item):

    if (not isinstance(json_list_item, dict)):
        raise ValueError(FORM_ID_FORMAT_ERROR)
    action = json_list_item.get('action', None)
    inputs = json_list_item.get('inputs', None)
    attributes = json_list_item.get('attributes', None)
    hosted_at_url = json_list_item.get('hosted_at_url', None)
    method = json_list_item.get('method', None)
    for json_attr in json_list_item:
        if (json_attr not in cls.ALLOWED_ATTRS):
            raise ValueError(FORM_ID_FORMAT_ERROR)
    if (action is not None):
        try:
            action = re.compile(action)
        except:
            raise ValueError(FORM_ID_FORMAT_ERROR)
    if (hosted_at_url is not None):
        try:
            hosted_at_url = re.compile(hosted_at_url)
        except:
            raise ValueError(FORM_ID_FORMAT_ERROR)
    return cls(action, inputs, attributes, hosted_at_url, method)
