Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
3653274
Fixes a problem when filtering a root array
Sep 3, 2018
daa186f
Support expressions on the right side of equations with array roots.
Sep 3, 2018
73e6d28
Add struct support
Sep 3, 2018
520a965
Use StructTag.Get() method to not change go version requirements.
Sep 3, 2018
4163564
Add test cases to test struct support
Sep 4, 2018
e5a3e0f
Fixes a problem when root is referenced in filter expression (#19)
Sep 4, 2018
db0ab2f
fix: obj is map[interface{}]interface{}, but the key is string, $.key…
ljun20160606 Dec 20, 2018
80d9de6
Update jsonpath.go
rakaupuv May 10, 2019
d49537a
Bh/quoted col fix (#1)
bheni Jun 9, 2021
4d9ff76
fix panic:obj is nil
Sep 13, 2021
64c1ff4
fix panic
Sep 24, 2021
2191531
go.mod: Rename go module to github.com/dolthub/jsonpath.
reltuk Apr 19, 2023
83d7c0a
Merge pull request #2 from dolthub/aaron/hardfork
reltuk Apr 19, 2023
77b8157
add support for scan op (#3)
jycor May 23, 2023
8dc1377
fix `scan` over `nil` and enforce ordering (#4)
jycor May 25, 2023
3929409
Make KeyError public
jycor Feb 1, 2024
19675ab
fix panic for empty jsonpaths (#6)
jycor Feb 27, 2024
26a24c9
Merge branch 'pr-21' into v0.1.0
oliveagle Jan 23, 2026
b8b90a7
release: v0.1.0
oliveagle Jan 23, 2026
c504841
Merge remote-tracking branch 'origin/master' into v0.1.1
oliveagle Jan 23, 2026
60723b6
Merge branch 'pr-22' into v0.1.2
oliveagle Jan 23, 2026
8f7d87a
Merge PR #23: Fix root reference in filter expression
oliveagle Jan 23, 2026
550e44a
Merge PR #24: Fix map[interface{}]interface{} key access
oliveagle Jan 23, 2026
642babd
Merge PR #25: Skip error when field is missing in filter
oliveagle Jan 23, 2026
a76e44d
Merge PR #33: Fix panic when obj is nil
oliveagle Jan 23, 2026
ef61723
Merge PR #44: Support Recursive Descent (..) Operator
oliveagle Jan 23, 2026
2903102
fix: t.Fatal format and $..* tokenization
oliveagle Jan 23, 2026
2165f11
Merge branch 'pr-30' into v0.1.4
oliveagle Jan 23, 2026
7e6a056
Merge PR #30: Quotation support and improvements
oliveagle Jan 23, 2026
30e48f3
Add justfile with test recipe
oliveagle Jan 23, 2026
f392fb1
fix: issue #43 root array filter support
oliveagle Jan 23, 2026
d7d89e9
fix: issue #40 wildcard [*] over objects
oliveagle Jan 23, 2026
be5311a
fix: range syntax RFC 9535 compliance (#27)
oliveagle Jan 23, 2026
5d4dcf7
feat: add length() function support (#36)
oliveagle Jan 23, 2026
ccd2ba6
feat: RFC 9535 function support (#41)
oliveagle Jan 23, 2026
3b43da8
split test 1
oliveagle Jan 23, 2026
e6f2ae5
refactor: extract tokenize tests to jsonpath_tokenize_test.go
oliveagle Jan 23, 2026
fb7a4e2
refactor: extract parse_token tests to jsonpath_parse_test.go
oliveagle Jan 23, 2026
7b0800c
refactor: extract accessor tests to jsonpath_accessor_test.go
oliveagle Jan 23, 2026
f747ad6
refactor: extract comparison tests to jsonpath_comparison_test.go
oliveagle Jan 23, 2026
aa50d9f
refactor: extract edge case tests to jsonpath_edgecase_test.go
oliveagle Jan 23, 2026
7eefb97
refactor: extract root node and recursive tests to jsonpath_root_test.go
oliveagle Jan 23, 2026
a1e9862
test: add coverage for eval_length and get_length functions
oliveagle Jan 23, 2026
413e3be
test: add coverage tests for low-coverage functions
oliveagle Jan 23, 2026
53ba310
docs: update Operators table and examples in readme.md
oliveagle Jan 23, 2026
7c4ace7
fix: capitalize sentence beginnings in readme.md
oliveagle Jan 23, 2026
a6d6da4
fix: capitalize heading in readme.md
oliveagle Jan 23, 2026
74d6638
docs: fix formatting in readme.md
oliveagle Jan 23, 2026
cf7b60d
test: increase coverage to 81.9%
oliveagle Jan 24, 2026
7ee0445
test: increase coverage to 89% and comment out parse_filter_v1
oliveagle Jan 24, 2026
b168741
test: split jsonpath_coverage_test.go into multiple files
oliveagle Jan 24, 2026
a829565
Fix test syntax errors and update filter tests for coverage
oliveagle Jan 24, 2026
ea60adc
Merge branch 'v0.1.5'
oliveagle Jan 24, 2026
1000cfd
Add GitHub Actions CI workflow
oliveagle Jan 24, 2026
6433318
Fix CI: Use v0.1.5 jsonpath_test.go and fix workflow
oliveagle Jan 24, 2026
6d81ec7
Fix CI: go.mod version and simplify workflow
oliveagle Jan 24, 2026
794ec91
Add Go 1.15 testing support
oliveagle Jan 24, 2026
26f8898
Trigger CI
oliveagle Jan 24, 2026
0fc1547
Fix CI formatting check
oliveagle Jan 24, 2026
6b6c557
Remove staticcheck from CI
oliveagle Jan 24, 2026
3aac375
Fix CI formatting check
oliveagle Jan 24, 2026
341fdde
Clean up go.sum - remove unused dependencies
oliveagle Jan 24, 2026
6a9b7f8
Add 'No dependencies' to README
oliveagle Jan 24, 2026
6643a7d
Simplify CI: just test on Go 1.15
oliveagle Jan 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.15'
- name: Test
run: go test ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ _testmain.go
*.test
*.prof
.idea
coverage.out
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 oliver
Copyright (c) 2021, 2015; DoltHub Authors, oliver

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
37 changes: 37 additions & 0 deletions benchmark_reports/report_v0.1.4_2026-01-23.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
==========================================
JSONPath Benchmark Report
==========================================

Version: v0.1.4
Date: 2026-01-23
Go Version: go1.25.5

==========================================
Benchmarks
==========================================

goos: linux
goarch: amd64
pkg: github.com/oliveagle/jsonpath
cpu: AMD RYZEN AI MAX+ 395 w/ Radeon 8060S
BenchmarkJsonPathLookupCompiled-32 35118480 33.26 ns/op 0 B/op 0 allocs/op
BenchmarkJsonPathLookup-32 1713906 670.7 ns/op 568 B/op 47 allocs/op
BenchmarkJsonPathLookup_0-32 3803637 309.1 ns/op 272 B/op 24 allocs/op
BenchmarkJsonPathLookup_1-32 1773507 655.3 ns/op 568 B/op 47 allocs/op
BenchmarkJsonPathLookup_2-32 1705456 717.5 ns/op 584 B/op 49 allocs/op
BenchmarkJsonPathLookup_3-32 1362768 883.8 ns/op 776 B/op 58 allocs/op
BenchmarkJsonPathLookup_4-32 1431178 833.1 ns/op 720 B/op 54 allocs/op
BenchmarkJsonPathLookup_5-32 588325 2039 ns/op 1426 B/op 132 allocs/op
BenchmarkJsonPathLookup_6-32 102320 11595 ns/op 15265 B/op 348 allocs/op
BenchmarkJsonPathLookup_7-32 101847 12036 ns/op 15657 B/op 450 allocs/op
BenchmarkJsonPathLookup_8-32 1373995 852.0 ns/op 832 B/op 53 allocs/op
BenchmarkJsonPathLookup_9-32 126504 9328 ns/op 14166 B/op 334 allocs/op
BenchmarkJsonPathLookup_10-32 231618 4942 ns/op 3797 B/op 225 allocs/op
BenchmarkJsonPathLookup_Simple-32 1728055 693.0 ns/op 568 B/op 49 allocs/op
BenchmarkJsonPathLookup_Filter-32 172152 6510 ns/op 9711 B/op 227 allocs/op
BenchmarkJsonPathLookup_Range-32 1479668 830.8 ns/op 720 B/op 54 allocs/op
BenchmarkJsonPathLookup_Recursive-32 746787 1618 ns/op 1850 B/op 65 allocs/op
BenchmarkJsonPathLookup_RootArrayFilter-32 227734 5397 ns/op 9086 B/op 169 allocs/op
BenchmarkCompileAndLookup-32 237066 4844 ns/op 6778 B/op 182 allocs/op
PASS
ok github.com/oliveagle/jsonpath 30.683s
37 changes: 37 additions & 0 deletions benchmark_reports/report_v0.1.5_2026-01-23.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
==========================================
JSONPath Benchmark Report
==========================================

Version: v0.1.5
Date: 2026-01-23
Go Version: go1.25.5

==========================================
Benchmarks
==========================================

goos: linux
goarch: amd64
pkg: github.com/oliveagle/jsonpath
cpu: AMD RYZEN AI MAX+ 395 w/ Radeon 8060S
BenchmarkJsonPathLookupCompiled-32 35843217 32.78 ns/op 0 B/op 0 allocs/op
BenchmarkJsonPathLookup-32 1792260 650.9 ns/op 568 B/op 47 allocs/op
BenchmarkJsonPathLookup_0-32 3874945 307.7 ns/op 272 B/op 24 allocs/op
BenchmarkJsonPathLookup_1-32 1848116 662.4 ns/op 568 B/op 47 allocs/op
BenchmarkJsonPathLookup_2-32 1747178 687.7 ns/op 584 B/op 49 allocs/op
BenchmarkJsonPathLookup_3-32 1391294 887.9 ns/op 776 B/op 58 allocs/op
BenchmarkJsonPathLookup_4-32 1427325 826.9 ns/op 720 B/op 54 allocs/op
BenchmarkJsonPathLookup_5-32 572890 2075 ns/op 1426 B/op 132 allocs/op
BenchmarkJsonPathLookup_6-32 105139 12016 ns/op 15265 B/op 348 allocs/op
BenchmarkJsonPathLookup_7-32 101718 12179 ns/op 15657 B/op 450 allocs/op
BenchmarkJsonPathLookup_8-32 1419068 856.9 ns/op 832 B/op 53 allocs/op
BenchmarkJsonPathLookup_9-32 131704 9617 ns/op 14166 B/op 334 allocs/op
BenchmarkJsonPathLookup_10-32 234868 5123 ns/op 3801 B/op 225 allocs/op
BenchmarkJsonPathLookup_Simple-32 1755504 699.2 ns/op 568 B/op 49 allocs/op
BenchmarkJsonPathLookup_Filter-32 171878 6801 ns/op 9711 B/op 227 allocs/op
BenchmarkJsonPathLookup_Range-32 1367176 823.0 ns/op 720 B/op 54 allocs/op
BenchmarkJsonPathLookup_Recursive-32 752602 1615 ns/op 1850 B/op 65 allocs/op
BenchmarkJsonPathLookup_RootArrayFilter-32 218097 5517 ns/op 9086 B/op 169 allocs/op
BenchmarkCompileAndLookup-32 255794 4995 ns/op 6778 B/op 182 allocs/op
PASS
ok github.com/oliveagle/jsonpath 31.044s
36 changes: 36 additions & 0 deletions generate_bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
# Generate benchmark report for the current version

VERSION=${1:-$(git rev-parse --abbrev-ref HEAD)}
DATE=$(date +%Y-%m-%d)
OUTPUT_DIR="benchmark_reports"

echo "Generating benchmark report for version: $VERSION"
echo "Date: $DATE"

# Run benchmarks and save output
REPORT_FILE="${OUTPUT_DIR}/report_${VERSION}_${DATE}.txt"

{
echo "=========================================="
echo "JSONPath Benchmark Report"
echo "=========================================="
echo ""
echo "Version: $VERSION"
echo "Date: $DATE"
echo "Go Version: $(go version | awk '{print $3}')"
echo ""
echo "=========================================="
echo "Benchmarks"
echo "=========================================="
echo ""
go test -bench=. -benchmem ./...
} > "$REPORT_FILE" 2>&1

echo "Report saved to: $REPORT_FILE"

# Also print summary
echo ""
echo "Summary:"
echo " Total benchmarks: $(grep -c "^Benchmark" "$REPORT_FILE" || echo "0")"
echo " Report size: $(wc -c < "$REPORT_FILE") bytes"
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/oliveagle/jsonpath

go 1.15
Empty file added go.sum
Empty file.
Loading