Source code for pacifica.notifications.jsonpath

#!/usr/bin/python
# -*- coding: utf-8 -*-
"""The jsonpath interface module."""
from jsonpath2.path import Path


[docs]def parse(jsonpath_str): """Parse the json path.""" return Path.parse_str(jsonpath_str)
[docs]def find(expr, data): """Match the expression in the data and return truthy value.""" return bool(list(expr.match(data)))