The JSONPath Next-Generation (jsonpath-ng) library provides a robust and significantly extended implementation of JSONPath for Python that aims to be standard compliant, including arithmetic and binary comparison operators, as defined in the original JSONPath proposal.
This library differs from other JSONPath implementations in that it is a full language implementation, meaning the JSONPath expressions are first class objects, easy to analyze, transform, parse, print, and extend.
The jsonpath-ng packages merges both jsonpath-rw and jsonpath-rw-ext and provides several AST API enhancements, such as the ability to update or removes nodes in the tree.
Common Pitfalls
Extended functionality (like the use of arithmetic operators) requires including the extended parser instead of the standard parser:
#from jsonpath_ng import parse
from jsonpath_ng.ext import parse