Version 0.8.0
Breaking changes
- Changed the
JSONPathMatch.partsrepresentation of the non-standard keys selector (default~) to be~followed by the key name. It used to be two "parts",~and key index. - All
FilterExpressionsubclasses must now implementchildren()andset_children(). These methods facilitate filter expression inspection and caching.
Fixes
- Changed
findall()andfinditer()to acceptdataarguments of anyio.IOBasesubclass, not justTextIO.
Features
- Added the
JSONPointerclass and methods for converting aJSONPathMatchto aJSONPointer.JSONPointeris compliant with RFC 6901 (docs). - Added the
JSONPatchclass.JSONPatchimplements RFC 6902 (docs). - Added
jsonpath.pointer.resolve(), a convenience function for resolving a JSON Pointer (docs). - Added
jsonpath.patch.apply(), a convenience function for applying a JSON Patch (docs). - Added
jsonpath.match(), a convenience function returning aJSONPathMatchinstance for the first match of a path, orNoneif there were no matches (docs). - Added filter expression caching. Controlled with the
filter_cachingargument toJSONPathEnvironment, filter expression caching is enabled by default. See [#14] - All selectors now use
env.match_classto instantiate newJSONPathMatchobjects. This allows for subclassing ofJSONPathMatch. - Added
jsonpath.filter.walk()for the benefit of filter expression static analysis.