Skip to content

DOC-6829 Add preemptive Spring Data Redis JSON docs [PARKED] - #3611

Open
andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-6829-preemptive-spring-data-redis-json-docs
Open

DOC-6829 Add preemptive Spring Data Redis JSON docs [PARKED]#3611
andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-6829-preemptive-spring-data-redis-json-docs

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Preemptively documents the new template-layer JSON API in Spring Data Redis (DOC-6829), ahead of its upstream release. Adds a new recipe page under the Spring Data Redis section and links it from the section index.

  • New page: content/integrate/spring-framework-cache/json.md
  • Index entry: content/integrate/spring-framework-cache/_index.md

Warning

This PR is parked — do not merge. The docs are written against an unreleased, still-under-review upstream PR (spring-data-redis#3390). Merge only after the feature ships and the manifest below has been reconciled (see /unpark).

Park manifest

Ticket: DOC-6829
Parked at: 2026-07-10
Trigger to pick up: the JSON API is present in a released spring-data-redis version — testably, gh api "repos/spring-projects/spring-data-redis/contents/src/main/java/org/springframework/data/redis/core/RedisJsonTemplate.java?ref=<tag>" returns 200 at a release tag newer than 4.1.0. The expected first such release is 4.2.0-M1 (see the 2026-08-13 update below).
Labels: parked, do not merge yet

Pinned sources (state observed at park time)

Source URL Snapshot at park
SDR JSON support PR spring-projects/spring-data-redis#3390 state: open, merged: false, head SHA e35714beca1c1ac46f0cb8a325ac95b9e6199d0f, base main, milestone: none (no target version), updated 2026-07-08

To diff on unpark: re-read JsonOperations.java and RedisJsonTemplate.java at the released tag. Do not gate on the PR's merged flag — see the correction below.

⚠️ Trigger test CORRECTED — 2026-08-13 (/pr-scan-review)

The original trigger test could never fire. It said to compare merged / head.sha against the
snapshot. Spring Data projects rebase and close rather than merging, so #3390 reads
state: closed, merged: false, merged_at: null permanently, and its head SHA
(a7239457, moved from the park-time e35714be) never becomes a merge commit. A future /unpark 3611
following the manifest literally would have concluded "still open, hold" — and been wrong.

The code is on main and has been since before this scan. Verified three ways, not inferred from the
PR state:

Check Result @ 2026-08-13
main commit 8927add1 "Add support for Redis JSON" (also cf7878ec "Polishing" 2026-08-12)
core/RedisJsonTemplate.java @ main blob 0d79685d2e77eaaa40d08db41196954324e30e18, 23849 bytes
core/JsonOperations.java @ main blob b15772310a9cecccf4d193d52c213e135fe9019f, 22416 bytes
#3390 milestone 4.2.0-M1 (2026.1.0) (was none at park time)
main HEAD bc6fa4ab "Enter rampdown phase for 4.2.0-M1." (2026-08-13) — the M1 release is imminent
Latest releases 4.1.0 (2026-06-09), 3.5.13 (2026-06-24) → no released version contains JSON yet

So the blocker is now only the release, not the merge. Also on main: the 3.x→4.x migration guide
(#3403, commit 4d7f8038) — likewise closed, merged: false. Checked: this repo has no Redis-side SDR
migration docs (only content/integrate/spring-framework-cache/{_index,cache,geo-failover}.md), so there is
nothing to align with it. Don't re-derive that at unpark.

Re-fetch: gh api "repos/spring-projects/spring-data-redis/contents/src/main/java/org/springframework/data/redis/core/RedisJsonTemplate.java?ref=<tag>" --jq '{sha,size}' and
gh api repos/spring-projects/spring-data-redis/releases --jq '.[0:5][] | {tag:.tag_name,published:.published_at}'

🔴 Signature reconciliation — four CONFIRMED defects, 2026-08-13 (/pr-scan-review)

Because the API is now on main at fixed blob SHAs, the "LOW confidence" section below stopped being
speculative and became checkable — so it was checked. Four of the page's claims are wrong and one
snippet would not compile. Each was verified by reading the files/directory listings at main, not by code
search alone (search total_count: 0 is not evidence on its own).

Page claims Reality @ main
new JacksonRedisJsonSerializer<>(User.class) No such class. The interface is RedisJsonSerializer extends RedisSerializer<Object>; the Jackson impls in serializer/ are JacksonJsonRedisSerializer, GenericJacksonJsonRedisSerializer (plus the Jackson2 pair)
"Use StringRedisJsonTemplate if you want String keys…" No such class. core/ contains only JsonOperations.java, RedisJsonOperations.java, RedisJsonTemplate.java
RedisJsonTemplate<String, User> + no-arg new + setKeySerializer() / setJsonSerializer() public class RedisJsonTemplate<K> implements RedisJsonOperations<K>one type parameter, constructor-injected: RedisJsonTemplate(RedisConnectionFactory, RedisSerializer<K> keySerializer, …). No matching setters
JsonResult<User> / JsonResult<String> interface JsonResult extends JsonValuenot generic. Values come out via as(Class) / asString(). Note a separate JsonResults extends Streamable<JsonResult> exists for the multi-key form

Resolved cleanly in the page's favour — do not re-check these:

  • mergeWith(Object) kept its name (checklist item "may ship as merge" → resolved, it did not).
  • setIfAbsent exists (a default delegating to conditional(JsonSetSpec::ifAbsent).set(value)); setIfPresent also exists and the page does not yet mention it.
  • The get(K key) vs fluent value(key).get() disagreement was both readings being right: get(K) is a default method delegating to value(key).get(). Same for paths(key, String...) (on JsonOperations) vs path(String) (on PathSpec) — both exist.
  • array().length(), array().trim(int,int), array().indexOf(Object), string().length()List<@Nullable Long>; bool().toggle()List<@Nullable Boolean>. All match the page exactly.
  • opsForJson() was NOT added — absent from both RedisOperations and RedisTemplate. The checklist item "if added before release, lead the page with it" resolves as no restructure needed; RedisJsonTemplate stays the entry point.

The damage is therefore confined to the bean-wiring block and the result types — the fluent operation
surface the page spends most of its length on is correct.

Observed API shape the page assumes (LOW confidence at park time — superseded by the 2026-08-13 reconciliation note above)

  • Fluent, spec-based entry points on RedisJsonTemplate: value(key), array(key), string(key), bool(key).
  • .path("$.jsonpath") chaining; set / setIfAbsent / get / paths.
  • Array: append, length, indexOf, trim. String: append, length. Boolean: toggle. Document: mergeWith.
  • Bean wiring: RedisJsonTemplate + JacksonRedisJsonSerializer(Type.class) over the existing RedisConnectionFactory.
  • Access is client-agnostic: identical API over Jedis and Lettuce (clients diverge only in internal converters/path types; full parity in the PR).

Re-check checklist (work these on unpark)

  • (highest risk) Rewrite the bean-wiring blockRedisJsonTemplate<K> is single-parameter and constructor-injected, and both JacksonRedisJsonSerializer and StringRedisJsonTemplate do not exist. The snippet as written will not compile. See the 2026-08-13 reconciliation table.
  • Fix the result typesJsonResult is not generic; replace JsonResult<User> / JsonResult<String> with JsonResult + as(Class) / asString().
  • Method signatures — the fluent surface (value/array/string/bool, path/paths, append/length/indexOf/trim/toggle/mergeWith, set/setIfAbsent) was verified against main on 2026-08-13 and is correct. Re-verify only against the released tag, and only as a diff versus blobs 0d79685d (RedisJsonTemplate.java) / b1577231 (JsonOperations.java) — if those are unchanged at the tag, no signature can have moved.
  • opsForJson() — resolved 2026-08-13: not added to RedisOperations/RedisTemplate. Re-check once at the released tag, then drop this item.
  • Version — replace the {version} placeholder in the Maven/Gradle snippets with the first release that includes JSON support (expected 4.2.0-M1). Decide explicitly whether a milestone (-M1) release is enough to unpark, or whether to hold for 4.2.0 GA — a page whose only available version is a milestone build needs to say so.
  • BoundJsonOperations — explicitly deferred in the PR. If it lands before GA, add a bound-operations section.
  • setIfPresent — exists on main and the page doesn't mention it. Decide whether to cover it alongside setIfAbsent.
  • Runnable examples — convert inline java blocks to tested TCE (clients-example) doctests once the feature reaches the client example repos.
  • Jedis/Lettuce parity at release — re-confirm the "works with either" claim; the two clients could ship support on different timelines.
  • Staleness — rebase/merge main; re-run link checks; confirm relref targets and the bannerText note are still valid.

On unpark, then

Update the docs to reconcile, remove the bannerText warning, drop the parked / do not merge yet labels, run /reflect (record what actually changed vs predicted) and /finalize (the durable squash — deferred until now on purpose so these re-check notes survive).

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only changes with no runtime impact; API examples may drift until the upstream feature ships and the parked PR is reconciled.

Overview
Adds preemptive documentation for the unreleased Spring Data Redis template JSON API (DOC-6829), with a prominent banner noting the content tracks spring-data-redis#3390 and may change before GA.

A new recipe page json.md under Spring Data Redis covers requirements (Redis JSON, Lettuce/Jedis, Jackson), Maven/Gradle setup with a {version} placeholder, RedisJsonTemplate / JacksonRedisJsonSerializer bean wiring, and fluent examples for whole-document value() ops, JSON path updates, array() / string() / bool() helpers, and mergeWith(), with links to existing JSON/path/command docs.

The section _index.md gains a third bullet linking to the new page alongside cache and geo-failover recipes.

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

Document the new template-layer JSON API from the in-progress SDR PR
spring-projects/spring-data-redis#3390 ahead of its release. The page
lives under content/integrate/spring-framework-cache/, which despite the
directory name is the Spring Data Redis section (LinkTitle "Spring Data
Redis"), alongside the cache and geo-failover recipes.

The non-obvious call: no per-client split. RedisJsonTemplate/JsonOperations
is client-agnostic and identical whether Jedis or Lettuce backs the
connection — the clients diverge only in internal converters/path types
below the API surface, with full feature parity. So one set of examples
serves both. Examples are inline java (not runnable TCE snippets) because
the feature isn't in the client example repos yet, and a bannerText flags
the API as unreleased and subject to change.

Learned: SDR JSON template API is unified across Jedis/Lettuce; docs based on an unmerged PR
Directive: keep the JSON examples client-agnostic — do not split into Jedis vs Lettuce variants
Recheck: when spring-data-redis#3390 merges and ships — re-verify method signatures, bean/serializer wiring, and convert examples to runnable TCE doctests
Gaps: code examples untested; signatures and API shape read from an in-progress, still-reviewed diff
Ticket: DOC-6829
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andy-stark-redis andy-stark-redis added do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead. labels Jul 10, 2026
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

DOC-6829

andy-stark-redis added a commit that referenced this pull request Jul 22, 2026
Renamed the parked-PR thaw skill from `/pickup` to `/unpark` — directory, frontmatter, title, and prose — to free the `/pickup` name for another skill where it fits better; `park`/`unpark` also reads as a cleaner verb pair. Updated the two files that reference it, `/park` and the shared `_shared/park-manifest.md` contract, so the pairing stays consistent. The three parked PRs that instructed `/pickup <n>` (#3611, #3641, #3652) were updated out-of-band so no stale invocation survives. Approved by dwdougherty; Cursor Bugbot clean.

Directive: Two "pickup" strings are left un-renamed on purpose — the historical .claude/state/assess-comments.coverage.md audit log (it records the skill's old name as it was at the time; renaming falsifies history) and the "Trigger to pick up:" manifest field name in park-manifest.md (a header field, not the skill name). Don't "fix" them in a follow-up grep-and-replace.
Ticket: DOC-6876
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant