I'd like to programmatically compare two JSONPaths, preferably using the Python library jsonpath_ng as it is already used by the project.
I need to be able to tell for example, whether the item pointed to by this JSONPath:
"$.top.middle[0].bottom[0].START"
Will also be pointed to by this one with wildcards:
"$.top.middle[*].bottom[*].START"
I can bodge this simply by replacing numbers with *
, but that won't account for any other JSONPath features might be used in the future. So I'd like to use some feature of a jsonpath-compatible library like jsonpath_ng to do this properly.