@@ -10,7 +10,7 @@ nav_order: 1
1010Hyperbee JsonPath is a high-performance JSONPath parser for ` System.Text.Json ` , that supports both ` JsonElement ` and ` JsonNode ` .
1111The library is designed to be fast and extensible, allowing support for other JSON document types and functions.
1212
13- ## Why Choose Hyperbee JsonPath?
13+ ## Features
1414
1515Hyperbee is fast, lightweight, fully RFC-9535 conforming, and supports ** both** ` JsonElement ` and ` JsonNode ` .
1616
@@ -97,125 +97,3 @@ Console.WriteLine(path); // Output: "$.store.book[0].category"
9797
9898```
9999
100-
101- ## Comparison with Other Libraries
102-
103- There are other excellent libraries .NET JsonPath.
104-
105- ### [ JsonPath.Net] ( https://docs.json-everything.net/path/basics/ ) Json-Everything
106-
107- - ** Pros:**
108- - Comprehensive feature set.
109- - Deferred execution queries with ` IEnumerable ` .
110- - Enhanced JsonPath syntax.
111- - Strong community support.
112-
113- - ** Cons:**
114- - No support for ` JsonElement ` .
115- - More memory intensive.
116- - Not quite as fast as other implementations.
117-
118- ### [ JsonCons.NET] ( https://danielaparker.github.io/JsonCons.Net/articles/JsonPath/JsonConsJsonPath.html )
119-
120- - ** Pros:**
121- - High performance.
122- - Enhanced JsonPath syntax.
123-
124- - ** Cons:**
125- - No support for ` JsonNode ` .
126- - Does not return an ` IEnumerable ` result (no defered query execution).
127-
128- ### [ Json.NET] ( https://www.newtonsoft.com/json ) Newtonsoft
129-
130- - ** Pros:**
131- - Comprehensive feature set.
132- - Deferred execution queries with ` IEnumerable ` .
133- - Documentation and examples.
134- - Strong community support.
135-
136- - ** Cons:**
137- - No support for ` JsonElement ` , or ` JsonNode ` .
138-
139- ## Benchmarks
140-
141- Here is a performance comparison of various queries on the standard book store document.
142-
143- ``` json
144- {
145- "store" : {
146- "book" : [
147- {
148- "category" : " reference" ,
149- "author" : " Nigel Rees" ,
150- "title" : " Sayings of the Century" ,
151- "price" : 8.95
152- },
153- {
154- "category" : " fiction" ,
155- "author" : " Evelyn Waugh" ,
156- "title" : " Sword of Honour" ,
157- "price" : 12.99
158- },
159- {
160- "category" : " fiction" ,
161- "author" : " Herman Melville" ,
162- "title" : " Moby Dick" ,
163- "isbn" : " 0-553-21311-3" ,
164- "price" : 8.99
165- },
166- {
167- "category" : " fiction" ,
168- "author" : " J. R. R. Tolkien" ,
169- "title" : " The Lord of the Rings" ,
170- "isbn" : " 0-395-19395-8" ,
171- "price" : 22.99
172- }
173- ],
174- "bicycle" : {
175- "color" : " red" ,
176- "price" : 19.95
177- }
178- }
179- }
180- ```
181-
182- | Method | Mean | Error | StdDev | Allocated
183- | :----------------------- | ---------: | ----------: | ---------: | ---------:
184- | ` $..* First() `
185- | Hyperbee_JsonElement | 2.874 μs | 1.6256 μs | 0.0891 μs | 3.52 KB
186- | Hyperbee_JsonNode | 3.173 μs | 0.7979 μs | 0.0437 μs | 3.09 KB
187- | JsonEverything_JsonNode | 3.199 μs | 2.4697 μs | 0.1354 μs | 3.53 KB
188- | JsonCons_JsonElement | 5.976 μs | 8.4042 μs | 0.4607 μs | 8.48 KB
189- | Newtonsoft_JObject | 9.219 μs | 2.9245 μs | 0.1603 μs | 14.22 KB
190- | | | | |
191- | ` $..* `
192- | JsonCons_JsonElement | 5.674 μs | 3.8650 μs | 0.2119 μs | 8.45 KB
193- | Hyperbee_JsonElement | 7.934 μs | 3.5907 μs | 0.1968 μs | 9.13 KB
194- | Hyperbee_JsonNode | 10.457 μs | 7.7120 μs | 0.4227 μs | 10.91 KB
195- | Newtonsoft_JObject | 10.722 μs | 4.1310 μs | 0.2264 μs | 14.86 KB
196- | JsonEverything_JsonNode | 23.096 μs | 10.8629 μs | 0.5954 μs | 36.81 KB
197- | | | | |
198- | ` $..price `
199- | Hyperbee_JsonElement | 4.428 μs | 4.6731 μs | 0.2561 μs | 4.2 KB
200- | JsonCons_JsonElement | 5.355 μs | 1.1624 μs | 0.0637 μs | 5.65 KB
201- | Hyperbee_JsonNode | 7.931 μs | 0.6970 μs | 0.0382 μs | 7.48 KB
202- | Newtonsoft_JObject | 10.334 μs | 8.2331 μs | 0.4513 μs | 14.4 KB
203- | JsonEverything_JsonNode | 17.000 μs | 14.9812 μs | 0.8212 μs | 27.63 KB
204- | | | | |
205- | ` $.store.book[?(@.price == 8.99)] `
206- | Hyperbee_JsonElement | 4.153 μs | 3.6089 μs | 0.1978 μs | 5.24 KB
207- | JsonCons_JsonElement | 4.873 μs | 1.0395 μs | 0.0570 μs | 5.05 KB
208- | Hyperbee_JsonNode | 6.980 μs | 5.1007 μs | 0.2796 μs | 8 KB
209- | Newtonsoft_JObject | 10.629 μs | 3.9096 μs | 0.2143 μs | 15.84 KB
210- | JsonEverything_JsonNode | 11.133 μs | 7.2544 μs | 0.3976 μs | 15.85 KB
211- | | | | |
212- | ` $.store.book[0] `
213- | Hyperbee_JsonElement | 2.677 μs | 2.2733 μs | 0.1246 μs | 2.27 KB
214- | Hyperbee_JsonNode | 3.126 μs | 3.5345 μs | 0.1937 μs | 2.77 KB
215- | JsonCons_JsonElement | 3.229 μs | 0.0681 μs | 0.0037 μs | 3.21 KB
216- | JsonEverything_JsonNode | 4.612 μs | 2.0037 μs | 0.1098 μs | 5.96 KB
217- | Newtonsoft_JObject | 9.627 μs | 1.1498 μs | 0.0630 μs | 14.56 KB
218-
219- ## Additional Documentation
220-
221- Additional documentation for [ JsonPath syntax can be found here] ( jsonpath-syntax ) .
0 commit comments