什么是JSONPath? (What is JSONPath?)
JSONPath is an expression language to parse JSON data. It’s very similar to the XPath expression language to parse XML data.
JSONPath是一种用于解析JSON数据的表达语言。 与解析XML数据的XPath表达式语言非常相似。
The idea is to parse the JSON data and get the value you want. This is more memory efficient because we don’t need to read the complete JSON data.
想法是解析JSON数据并获取所需的值。 由于不需要读取完整的JSON数据,因此内存使用效率更高。
Python JSONPath库 (Python JSONPath Libraries)
There are many JSONPath libraries in Python.
Python中有许多JSONPath库。
- jsonpath: It’s a port of the Perl, and JavaScript versions of JSONPath. jsonpath :这是Perl和JSONPathJavaScript版本的端口。
- jsonpath-rw: The complete Python implementation of the JSONPath expressions. The JSONPath expressions are first class objects, easy to analyze, transform, parse, print, and extend. The jsonpath-rw-ext module provides some additional extensions to