We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 592794e commit 2f47af1Copy full SHA for 2f47af1
jsonpath/filter.py
@@ -668,6 +668,9 @@ def __init__(self) -> None:
668
super().__init__()
669
self.volatile = True
670
671
+ def __str__(self) -> str:
672
+ return "#"
673
+
674
def __eq__(self, other: object) -> bool:
675
return isinstance(other, CurrentKey)
676
tests/test_parse.py
@@ -170,6 +170,11 @@ class Case:
170
path="$.some.~",
171
want="$['some'][~]",
172
),
173
+ Case(
174
+ description="current key identifier",
175
+ path="$[?# > 2]",
176
+ want="$[?# > 2]",
177
+ ),
178
Case(
179
description="comparison to single quoted string literal with escape",
180
path="$[[email protected] == 'ba\\'r']",
0 commit comments