Settings

Theme

Show HN: JSONPath Benchmark in Java (SJF4J vs. Jayway)

1 points by hannyu 11 days ago · 1 comment · 1 min read


I ran a JMH benchmark comparing JSONPath performance in Java.

Libraries: - SJF4J - Jayway JsonPath

Workloads: - query on JsonNode - query on Map/List object graphs

Main result: - ~2x faster on typical queries - up to 7x faster on Map/List

One interesting takeaway is that performance differs a lot depending on whether you run on JsonNode vs native object graphs.

Full write-up: https://dev.to/hannyu/sjf4j-vs-jayway-jsonpath-up-to-7x-fast...

hannyuOP 11 days ago

Happy to share more details if anyone is interested.

The biggest gap appears when running JSONPath directly on Map/List instead of JsonNode.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection