Skip to content

test case for serializing custom numbers with config overrides #5199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

Conversation

pjfanning
Copy link
Member

the same as #5198 (3.x branch equivalent) but this works in 2.x


@Test
public void testConfigOverrideNonJdkNumber() throws Exception {
ObjectMapper mapper = jsonMapperBuilder().withConfigOverride(MyBigDecimal.class,
Copy link
Member

Choose a reason for hiding this comment

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

Arguably should work with override for BigDecimal, not impl type. But probably depends on exactly how Jackson registers relevant serializer (its handledType()) so becomes sort of implementation detail.

But if this is how things currently work, we'll go with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants