def _find_pattern(self, trigger):
    start_idx = self.line_str.rfind(trigger)
    if (start_idx == (- 1)):
        return None
    stop_idx = 0
    brace_counter = 0
    search_str = self.line_str[(start_idx + len(trigger)):]
    for match in re.finditer('{|}', search_str):
        stop_idx = match.start()
        if (search_str[stop_idx] == '{'):
            brace_counter += 1
        else:
            brace_counter -= 1
        if (brace_counter == 0):
            break
    search_str = search_str[:(stop_idx + 1)].strip()
    if search_str:
        return json2pattern(search_str)
    else:
        return None
def _find_pattern(self, trigger):
    start_idx = self.line_str.rfind(trigger)
    if (start_idx == (- 1)):
        return None
    stop_idx = 0
    brace_counter = 0
    search_str = self.line_str[(start_idx + len(trigger)):]
    for match in re.finditer('{|}', search_str):
        stop_idx = match.start()
        if (search_str[stop_idx] == '{'):
            brace_counter += 1
        else:
            brace_counter -= 1
        if (brace_counter == 0):
            break
    search_str = search_str[:(stop_idx + 1)].strip()
    if search_str:
        return json2pattern(search_str)
    else:
        return None