Skip to content

Jackson2HashMapper does not serialize BigDecimal fields when flatten = true #2365

Closed
@pr3st00

Description

@pr3st00

Hi,

I'm facing an issue when using BigDecimal fields and trying to serialize them using Jackson2HashMapper with flatten = true, where my BigDecimal fields are simply being discarded.

It seems like the exact same issue as the one below, but for a different type (original one was for Date/Calendar):

      https://github.com/spring-projects/spring-data-redis/issues/1572

It seems like a fix was put in place for dealing with java.util.Date as the fix for 1572:

if (cur.asText().equals("java.util.Date")) {
	resultMap.put(propertyPrefix, nodes.next().asText());
	break;
}

I'm trying to use deserialization options and custom deserializers to overcome the issue, but with no success. Do we have any options, or another fix is needed for this to work?

Thanks in advance!

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions