Back to browse
JSONPath Benchmark in Java (SJF4J vs. Jayway)

JSONPath Benchmark in Java (SJF4J vs. Jayway)

by hannyu·Mar 29, 2026·1 point·1 comment

AI Analysis

MidDark Horse

SJF4J beats Jayway by 7x on native objects, but JSONPath is a crowded category.

Strengths
  • JMH setup with warmup and measurement forks ensures benchmark validity.
  • Breaks down performance by JsonNode vs native Map/List object graphs.
  • Reveals POJO query support where Jayway requires JSON AST conversion.
Weaknesses
  • Links to a blog post rather than a runnable tool or library repo directly.
  • JSONPath optimization is a solved problem for most general use cases.
Target Audience

Java developers optimizing JSON processing

Similar To

Jayway JsonPath · JMH · Jackson

Post Description

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...

Similar Projects

Kreuzberg Comparative Benchmarks

The site weaponizes a compact set of benchmarks — throughput, RAM, cold-start, F1 score and install footprint — and even publishes raw JSON on GitHub, which makes it immediately useful for teams comparing ingestion options. Kreuzberg's Rust implementation posts jaw-dropping numbers against common tools; that's interesting, but the page leaves out crucial reproducibility details (datasets, seed runs, environment configs) you'd want before trusting the magnitude of those gaps.

Niche GemWizardry
nhirschfeld
104mo ago

OpenCode Benchmark Dashboard

Benchmarks OpenCode models locally, but lacks preloaded datasets and only works with configured OpenAI-compatible APIs.

Niche Gem
grigio
103mo ago