Skip to content

DOC-7032: Add tested client examples for JSONPath functions - #3927

Merged
andy-stark-redis merged 2 commits into
mainfrom
DOC-7032-json-path-functions
Sep 9, 2026
Merged

andy-stark-redis merged 2 commits into
mainfrom
DOC-7032-json-path-functions

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

🤖 Generated with Claude Code


Note

Low Risk
Documentation and executable examples only; no runtime or API behavior changes.

Overview
Reorganizes Redis 8.10 JSONPath function docs in path.md: drops the standalone Functions section with raw CLI blocks, places each function under Filter examples, and wires them to runnable clients-example steps (set="json_path_ops"). The intro feature list now links to those sections; general function/projection wording stays up front with evaluation semantics.

Adds ten new harness steps—func_length, func_count, func_value, func_keys, func_match_search, func_concat, func_math, func_array_access, func_aggregate, func_append—across the existing json_path_ops client examples (Go, Java/Jedis/Lettuce, Node, Python, Ruby, Rust, C#, PHP, etc.), with assertions matching the doc snippets.

Reviewed by Cursor Bugbot for commit 254193a. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

DOC-7032

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 8 related items from repository history (1 new this commit):

Memory updated at 254193a

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@andy-stark-redis
andy-stark-redis force-pushed the DOC-7032-json-path-functions branch 2 times, most recently from a46b330 to 14b7e5b Compare September 4, 2026 14:54
@andy-stark-redis
andy-stark-redis requested a review from a team September 7, 2026 09:19
@andy-stark-redis andy-stark-redis self-assigned this Sep 7, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label Sep 7, 2026

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Base automatically changed from DOC-7032-json-path-filters to main September 9, 2026 15:10
andy-stark-redis and others added 2 commits September 9, 2026 16:11
Move the illustrative CLI blocks in "Functions" into runnable
clients-example demos under "Filter examples", covering length(),
count(), value(), keys(), match()/search(), concat(),
abs()/ceiling()/floor(), first()/last()/index(),
min()/max()/avg()/sum()/stddev(), and append(). Extends the
json_path_ops TCE set from the filter-operators PR; verified against
a live Redis 8.10 server across all 11 clients.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Remove "## Functions" as a separate section — move each function's
description to sit directly above its runnable example under Filter
examples, matching the same restructuring already applied to the
filter operators. Link each function from the "Beginning with Redis
8.10..." list under JSONPath syntax instead, and fold the general
prefix/postfix-form note into that same list's framing text.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@andy-stark-redis
andy-stark-redis force-pushed the DOC-7032-json-path-functions branch from 14b7e5b to 254193a Compare September 9, 2026 15:16
@andy-stark-redis
andy-stark-redis merged commit 87365e4 into main Sep 9, 2026
51 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7032-json-path-functions branch September 9, 2026 15:17
andy-stark-redis added a commit that referenced this pull request Sep 9, 2026
Convert the two illustrative CLI blocks under "Projection expressions"
into runnable clients-example demos, in place — these stay under
Projection expressions rather than moving into Filter examples, unlike
the filter-operator and function batches. Completes the json_path_ops
TCE set (19 steps across #3926/#3927/this PR); same 11 clients,
verified against a live Redis 8.10 server.

A real finding from testing, not just an implementation note: a
multi-path JSON.GET reply's key order is not guaranteed — confirmed by
repeated calls against an unchanged stored document returning both
orderings. Every client's assertion here compares a parsed map/object,
never the raw string, for exactly that reason.

Constraint: json_path_ops multi-path JSON.GET assertions must compare parsed maps/objects, not raw strings — reply key order is not guaranteed
Directive: jedis's Path2 constructor auto-prepends "$." to a path not already starting with $ or . — mangles a parenthesized expression like "(a+b)/2" (used in proj_basic); use the legacy Path class for those calls instead
Ticket: DOC-7032
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants