Skip to content

Commit f8cb792

Browse files
committed
Upgrade implementations
Fix broken python upgrade mechanism
1 parent 8546c63 commit f8cb792

File tree

87 files changed

+549
-1089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+549
-1089
lines changed

bug_reports/Python_jsonpath-ng.md

Lines changed: 3 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,6 @@ Results do not match other implementations
33
The following queries provide results that do not match those of other implementations of JSONPath
44
(compare https://cburgmer.github.io/json-path-comparison/):
55

6-
- [ ] `$[0:3:-2]`
7-
Input:
8-
```
9-
[
10-
"first",
11-
"second",
12-
"third",
13-
"forth",
14-
"fifth"
15-
]
16-
```
17-
Expected output:
18-
```
19-
[]
20-
```
21-
Actual output:
22-
NOT_SUPPORTED
23-
```
24-
JsonPathParserError('Parse error at 1:5 near token : (:)')
25-
```
26-
27-
- [ ] `$[::]`
28-
Input:
29-
```
30-
[
31-
"first",
32-
"second"
33-
]
34-
```
35-
Expected output:
36-
```
37-
["first", "second"]
38-
```
39-
Actual output:
40-
NOT_SUPPORTED
41-
```
42-
JsonPathParserError('Parse error at 1:3 near token : (:)')
43-
```
44-
456
- [ ] `$[:]`
467
Input:
478
```
@@ -64,28 +25,7 @@ The following queries provide results that do not match those of other implement
6425
]
6526
```
6627

67-
- [ ] `$[0:3:2]`
68-
Input:
69-
```
70-
[
71-
"first",
72-
"second",
73-
"third",
74-
"forth",
75-
"fifth"
76-
]
77-
```
78-
Expected output:
79-
```
80-
["first", "third"]
81-
```
82-
Actual output:
83-
NOT_SUPPORTED
84-
```
85-
JsonPathParserError('Parse error at 1:5 near token : (:)')
86-
```
87-
88-
- [ ] `$[0:3:1]`
28+
- [ ] `$[0:3:0]`
8929
Input:
9030
```
9131
[
@@ -96,119 +36,9 @@ The following queries provide results that do not match those of other implement
9636
"fifth"
9737
]
9838
```
99-
Expected output:
100-
```
101-
["first", "second", "third"]
102-
```
103-
Actual output:
104-
NOT_SUPPORTED
105-
```
106-
JsonPathParserError('Parse error at 1:5 near token : (:)')
107-
```
108-
109-
- [ ] `$[010:024:010]`
110-
Input:
111-
```
112-
[
113-
0,
114-
1,
115-
2,
116-
3,
117-
4,
118-
5,
119-
6,
120-
7,
121-
8,
122-
9,
123-
10,
124-
11,
125-
12,
126-
13,
127-
14,
128-
15,
129-
16,
130-
17,
131-
18,
132-
19,
133-
20,
134-
21,
135-
22,
136-
23,
137-
24,
138-
25
139-
]
140-
```
141-
Expected output:
142-
```
143-
[10, 20]
144-
```
145-
Actual output:
146-
NOT_SUPPORTED
147-
```
148-
JsonPathParserError('Parse error at 1:9 near token : (:)')
149-
```
150-
151-
- [ ] `$[0:4:2]`
152-
Input:
153-
```
154-
[
155-
"first",
156-
"second",
157-
"third",
158-
"forth",
159-
"fifth"
160-
]
161-
```
162-
Expected output:
163-
```
164-
["first", "third"]
165-
```
166-
Actual output:
167-
NOT_SUPPORTED
168-
```
169-
JsonPathParserError('Parse error at 1:5 near token : (:)')
170-
```
171-
172-
- [ ] `$[1:3:]`
173-
Input:
174-
```
175-
[
176-
"first",
177-
"second",
178-
"third",
179-
"forth",
180-
"fifth"
181-
]
182-
```
183-
Expected output:
184-
```
185-
["second", "third"]
186-
```
187-
Actual output:
188-
NOT_SUPPORTED
189-
```
190-
JsonPathParserError('Parse error at 1:5 near token : (:)')
191-
```
192-
193-
- [ ] `$[::2]`
194-
Input:
195-
```
196-
[
197-
"first",
198-
"second",
199-
"third",
200-
"forth",
201-
"fifth"
202-
]
203-
```
204-
Expected output:
205-
```
206-
["first", "third", "fifth"]
207-
```
208-
Actual output:
209-
NOT_SUPPORTED
39+
Error:
21040
```
211-
JsonPathParserError('Parse error at 1:3 near token : (:)')
41+
ValueError('slice step cannot be zero')
21242
```
21343

21444
- [ ] `$..[0]`
@@ -596,25 +426,6 @@ The following queries provide results that do not match those of other implement
596426
JsonPathLexerError('Error on line 1, col 2: Unexpected character: 屬 ')
597427
```
598428

599-
- [ ] `$.2`
600-
Input:
601-
```
602-
{
603-
"a": "first",
604-
"2": "second",
605-
"b": "third"
606-
}
607-
```
608-
Expected output:
609-
```
610-
["second"]
611-
```
612-
Actual output:
613-
NOT_SUPPORTED
614-
```
615-
JsonPathParserError('Parse error at 1:2 near token 2 (NUMBER)')
616-
```
617-
618429
- [ ] `$.*.bar.*`
619430
Input:
620431
```

bug_reports/Python_python-jsonpath.md

Lines changed: 0 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@ The following queries provide results that do not match those of other implement
2121
]
2222
```
2323

24-
- [ ] `$[0]`
25-
Input:
26-
```
27-
"Hello World"
28-
```
29-
Expected output:
30-
```
31-
[]
32-
```
33-
Error:
34-
```
35-
Invalid JSON document - Expecting value: line 1 column 1 (char 0)
36-
```
37-
3824
- [ ] `$[key]`
3925
Input:
4026
```
@@ -140,65 +126,6 @@ The following queries provide results that do not match those of other implement
140126
]
141127
```
142128

143-
- [ ] `$[?(@.a && @.b || @.c)]`
144-
Input:
145-
```
146-
[
147-
{
148-
"a": true,
149-
"b": true
150-
},
151-
{
152-
"a": true,
153-
"b": true,
154-
"c": true
155-
},
156-
{
157-
"b": true,
158-
"c": true
159-
},
160-
{
161-
"a": true,
162-
"c": true
163-
},
164-
{
165-
"a": true
166-
},
167-
{
168-
"b": true
169-
},
170-
{
171-
"c": true
172-
},
173-
{
174-
"d": true
175-
},
176-
{}
177-
]
178-
```
179-
Expected output:
180-
```
181-
[{"a": true, "b": true}, {"a": true, "b": true, "c": true}, {"b": true, "c": true}, {"a": true, "c": true}, {"c": true}]
182-
```
183-
Actual output:
184-
```
185-
[
186-
{
187-
"a": true,
188-
"b": true
189-
},
190-
{
191-
"a": true,
192-
"b": true,
193-
"c": true
194-
},
195-
{
196-
"a": true,
197-
"c": true
198-
}
199-
]
200-
```
201-
202129
- [ ] `$.key..`
203130
Input:
204131
```
@@ -234,65 +161,5 @@ The following queries provide results that do not match those of other implement
234161
]
235162
```
236163

237-
- [ ] `$[:]['c','d']`
238-
Input:
239-
```
240-
[
241-
{
242-
"c": "cc1",
243-
"d": "dd1",
244-
"e": "ee1"
245-
},
246-
{
247-
"c": "cc2",
248-
"d": "dd2",
249-
"e": "ee2"
250-
}
251-
]
252-
```
253-
Expected output:
254-
```
255-
["cc1", "dd1", "cc2", "dd2"]
256-
```
257-
Actual output:
258-
```
259-
[
260-
"cc1",
261-
"cc2",
262-
"dd1",
263-
"dd2"
264-
]
265-
```
266-
267-
- [ ] `$.*['c','d']`
268-
Input:
269-
```
270-
[
271-
{
272-
"c": "cc1",
273-
"d": "dd1",
274-
"e": "ee1"
275-
},
276-
{
277-
"c": "cc2",
278-
"d": "dd2",
279-
"e": "ee2"
280-
}
281-
]
282-
```
283-
Expected output:
284-
```
285-
["cc1", "dd1", "cc2", "dd2"]
286-
```
287-
Actual output:
288-
```
289-
[
290-
"cc1",
291-
"cc2",
292-
"dd1",
293-
"dd2"
294-
]
295-
```
296-
297164

298165
For reference, the output was generated by the program in https://github.com/cburgmer/json-path-comparison/tree/master/implementations/Python_python-jsonpath.

0 commit comments

Comments
 (0)