Skip to content

Conversation

brushmate
Copy link
Contributor

@brushmate brushmate commented Aug 28, 2025

We now pass the ObjectMapper defined on the DefaultJsonParser to JsonValue and its subclasses. This ObjectMapper is used to map raw JSON nodes to specialized object instances.

Benefits:

  1. We avoid creating new ObjectMapper instances over and over again.
  2. We are able to configure the ObjectMapper.

Closes #3412.

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

@tishun
Copy link
Collaborator

tishun commented Sep 1, 2025

Hey, thanks for the contribution!

Seems there are still issues with the change, can you address them?

@brushmate
Copy link
Contributor Author

You're welcome. This must have happened because I used GitHub's 'resolve conflict' feature in the browser. I'm going to rebase my branch on the current main.

We now pass the ObjectMapper defined on the DefaultJsonParser to JsonValue and its subclasses. This ObjectMapper is used to map raw JSON nodes to specialized object instances.

Benefits:

1. We avoid creating new ObjectMapper instances over and over again.
2. We are able to configure the ObjectMapper.

Closes redis#3412.
@brushmate brushmate force-pushed the reuse-objectmapper-delegate-json-value branch from 9054e1b to 311179f Compare September 1, 2025 13:41
Copy link
Contributor

@a-TODO-rov a-TODO-rov left a comment

Choose a reason for hiding this comment

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

LGTM
Thank you @brushmate !
I will merge it and will backport it to 6.8

@a-TODO-rov a-TODO-rov merged commit ea34c02 into redis:main Sep 2, 2025
10 of 12 checks passed
tishun pushed a commit to tishun/lettuce-core that referenced this pull request Sep 2, 2025
We now pass the ObjectMapper defined on the DefaultJsonParser to JsonValue and its subclasses. This ObjectMapper is used to map raw JSON nodes to specialized object instances.

Benefits:

1. We avoid creating new ObjectMapper instances over and over again.
2. We are able to configure the ObjectMapper.

Closes redis#3412.
tishun pushed a commit that referenced this pull request Sep 2, 2025
We now pass the ObjectMapper defined on the DefaultJsonParser to JsonValue and its subclasses. This ObjectMapper is used to map raw JSON nodes to specialized object instances.

Benefits:

1. We avoid creating new ObjectMapper instances over and over again.
2. We are able to configure the ObjectMapper.

Closes #3412.
@ggivo ggivo added the type: improvement An improvement to the existing implementation label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement An improvement to the existing implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid creating a new instance of the ObjectMapper ctd.
4 participants