1- using System . Text . Json ;
1+ using System . Text . Json ;
22using System . Text . Json . Nodes ;
33using BenchmarkDotNet . Attributes ;
44using BenchmarkDotNet . Engines ;
@@ -24,46 +24,46 @@ public class JsonPathBenchmark
2424
2525 [ Params (
2626 // Root and Wildcard
27- "$" ,
27+ "$" ,
2828 "$.store.*" ,
2929 "$.store.* #First()" , // Test Enumerable.First()
3030
3131 // Property and Index Access
32- "$.store.book[0]" ,
33- "$.store.book[0].title" ,
34- "$.store.book[*]" ,
35- "$.store.book[*].author" ,
36- "$.store.book['category','author']" ,
32+ "$.store.book[0]" ,
33+ "$.store.book[0].title" ,
34+ "$.store.book[*]" ,
35+ "$.store.book[*].author" ,
36+ "$.store.book['category','author']" ,
3737
3838 // Recursive Descent
39- "$.store..price" ,
40- "$..author" ,
41- "$..*" ,
42- "$..['bicycle','price']" ,
43- "$..book[0,1]" ,
44- "$..book[?@.isbn]" ,
39+ "$.store..price" ,
40+ "$..author" ,
41+ "$..*" ,
42+ "$..['bicycle','price']" ,
43+ "$..book[0,1]" ,
44+ "$..book[?@.isbn]" ,
4545
4646 // Filters
47- "$.store.book[?(@.price < 10)].title" ,
48- "$.store.book[?(@.price > 10 && @.price < 20)]" ,
49- "$.store.book[?(@.category == 'fiction')]" ,
50- "$.store.book[?(@.author && @.title)]" ,
51- "$.store.book[?(@.price == 8.99)]" ,
52- "$..[?(@.price < 10)]" ,
53- "$..book[?@.price == 8.99 && @.category == 'fiction']" ,
54- "$.store.book[?(@.price < 10 || @.category == 'fiction')]" ,
55- "$.store.book[?(!@.isbn)]" ,
56- "$.store.book[?(length(@.title) > 10)]" ,
57-
47+ "$.store.book[?(@.price < 10)].title" ,
48+ "$.store.book[?(@.price > 10 && @.price < 20)]" ,
49+ "$.store.book[?(@.category == 'fiction')]" ,
50+ "$.store.book[?(@.author && @.title)]" ,
51+ "$.store.book[?(@.price == 8.99)]" ,
52+ "$..[?(@.price < 10)]" ,
53+ "$..book[?@.price == 8.99 && @.category == 'fiction']" ,
54+ "$.store.book[?(@.price < 10 || @.category == 'fiction')]" ,
55+ "$.store.book[?(!@.isbn)]" ,
56+ "$.store.book[?(length(@.title) > 10)]" ,
57+
5858
5959 // Array Slices and Unions
60- "$.store.book[-1:]" ,
61- "$.store.book[0,1]" ,
62- "$.store.book[:2]" ,
63- "$.store.book[0:3:2]" ,
60+ "$.store.book[-1:]" ,
61+ "$.store.book[0,1]" ,
62+ "$.store.book[:2]" ,
63+ "$.store.book[0:3:2]" ,
6464
6565 // Property Access (Direct)
66- "$.store.bicycle.color"
66+ "$.store.bicycle.color"
6767 ) ]
6868 public string Filter ;
6969
0 commit comments