Skip to content

DOC-6829 Add Spring Data Redis JSON docs - #3611

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

andy-stark-redis wants to merge 3 commits 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

Documents the template-layer JSON API in Spring Data Redis (DOC-6829), released in 4.2.0. 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

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only change with no application code, configuration, or security impact; main risk is API/version drift vs unreleased Spring Data Redis until GA.

Overview
Adds Spring Data Redis JSON integration docs: a new recipe page and a link from the Spring Data Redis section index.

The new json.md page documents the template-based RedisJsonTemplate API (targeting spring-data-redis 4.2.0): Maven/Gradle setup, GenericJacksonJsonRedisSerializer bean wiring, and examples for whole-document set/get, JSON path updates (setIfAbsent, setIfPresent), array/string/bool specs, and mergeWith, with links to Redis JSON and Spring reference material.

_index.md gains one Recipes bullet pointing at that page.

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

@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) <[email protected]>
@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

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

Memory updated at 2b4e7ce

andy-stark-redis and others added 3 commits November 24, 2026 11:17
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) <[email protected]>
The API this page was written against shipped in spring-data-redis 4.2.0-M1
(2026-08-21). Reconciling the page against the released source fixed six
defects, four of them compile errors. Still parked: 4.2.0-M1 is a milestone,
not a GA release, so the API can still move before 4.2.0.

Fixed:

- Bean wiring. `RedisJsonTemplate<K>` has ONE type parameter (the key type)
  and is constructor-injected, not a no-arg bean with setters. The page's
  `RedisJsonTemplate<String, User>` + `setJsonSerializer()` form does not
  exist in any released version.
- `JacksonRedisJsonSerializer` and `StringRedisJsonTemplate` do not exist.
- `JsonResult` is not generic, and `getValue()` is not one of its methods.
  Values come out via `as(Class)` / `asString()` / `map()`.
- `value(key).paths(...)` exists on nothing. `paths` is a top-level
  `JsonOperations` method; the specs only carry `path(String)`.
- Added `setIfPresent`, which exists as a default alongside `setIfAbsent`.
- Banner rewritten: it still described #3390 as an in-progress PR.

The most useful thing this taught: the park manifest's own correction note
was itself wrong, and following it would have produced a second compile
error. It offered `JacksonJsonRedisSerializer` and
`GenericJacksonJsonRedisSerializer` as interchangeable replacements. They
are not. `JacksonJsonRedisSerializer<T> implements RedisSerializer<T>`,
while the constructor demands `RedisJsonSerializer` — only the two
`Generic*` classes implement it. Identical-looking names, incompatible
types, and the byte-identical blob check that discharged the "signatures"
item could never have caught it, because these classes live in files the
manifest never pinned. A discharge is only as wide as its pins.

Second lesson: the manifest declared the fluent surface "correct as
written" after a signature diff. Two of the six defects were in that
surface. A signature diff proves nothing moved; it does not prove the page
ever matched.

Learned: a park manifest's correction notes need the same scepticism as the page they correct; a blob-identity discharge only covers the files it pins
Ticket: DOC-6829
Constraint: RedisJsonTemplate's 3rd ctor arg must implement RedisJsonSerializer — only GenericJacksonJsonRedisSerializer (Jackson 3) and GenericJackson2JsonRedisSerializer (Jackson 2) do.
Rejected: JacksonJsonRedisSerializer as the document serializer | implements RedisSerializer<T>, not RedisJsonSerializer; will not compile
Recheck: when spring-data-redis 4.2.0 reaches GA — re-diff both blobs at the GA tag and replace the {version} placeholder
Gaps: no snippet was compiled against the 4.2.0-M1 artifact; every signature was read from source at the tag, which is weaker than a build
Directive: BoundJsonOperations is absent at 4.2.0-M1 (0 hits, core/ listing confirms) — do not re-derive that check
Pin the Maven and Gradle snippets to 4.2.0, drop the milestone bannerText, and
rewrite the paths() snippet that no longer compiled against the released API.

The trigger test (non-prerelease 4.2.0 containing RedisJsonTemplate.java) fired on
2026-11-20. RedisJsonTemplate (04410d9b/28514) and JsonOperations (7b7ec52a/27173)
are byte-identical at 4.2.0, 4.2.0-RC1 and 4.2.0-M2, so nothing moved after the
#3433 refactor. The old json.md line 144, `JsonResult city = template.paths(...)`,
did not compile: paths() now returns JsonPathResult, whose asString() is the raw
JSON.GET response with match arrays, not a bare value. The replacement
`value(key).path("$.city").get().as(String.class)` goes through JsonResult.as(),
which deserializes the single match. The park-time prediction was right about the
refactor but the 08-26 reconciliation could not have caught it: those blobs were
pinned at M1.

Learned: pin every file the page calls into, and re-pin at the release tag, not an earlier milestone
Recheck: when a Redis JSON example repo or TCE harness supports Spring Data Redis
Gaps: not compiled against the 4.2.0 jar; JsonResult.matches() and exists() are not covered
Ticket: DOC-6829

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@andy-stark-redis
andy-stark-redis force-pushed the DOC-6829-preemptive-spring-data-redis-json-docs branch from 363dd62 to 2b4e7ce Compare November 24, 2026 11:18
@andy-stark-redis
andy-stark-redis requested a review from a team November 24, 2026 11:20
@andy-stark-redis andy-stark-redis changed the title DOC-6829 Add preemptive Spring Data Redis JSON docs [PARKED] DOC-6829 Add Spring Data Redis JSON docs Nov 24, 2026
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