Questions tagged [jackson-modules]

177 questions
2
votes
3 answers

override id name generated by jackson-datatype-hibernate

Is it possible to override the name generated by jackson-datatype-hibernate Feature.SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS? Currently it is serializing using full package name: "client":{"com.test.domain.Client":1} I want it to use id…
jax
  • 37,735
  • 57
  • 182
  • 278
2
votes
0 answers

Conflict between packages com.fasterxml.jackson.databind.jsonschema and com.fasterxml.jackson.databind.jsonSchema

I have a problem incorporating both the jackson-module-jsonSchema-2.1.0.jar and jackson-databind-2.1.5.jar libraries into my project. I'm using Eclipse on Windows and I have created a new "Plug-in from Existing JAR Archives" project, containing both…
Andrea
  • 91
  • 6
1
vote
0 answers

java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/blackbird/ser/ToBooleanFunction

I am getting this error trying to upgrade from Java 11 to 17. I confirmed that the ToBooleanFunction exists in the 2.15.2 version, as well as some other versions I've tried. I also confirmed that the library is in the class path. Here are the…
Bee
  • 195
  • 1
  • 3
  • 12
1
vote
0 answers

Apply Jackson coercion configuration feature to specified deserialization cases

There are some fields, which should be deserialized from String to Double. However, the general ObjectMapper configuration doesn't allow coercion of scalars: configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) Before Jackson coercion…
user3856196
  • 349
  • 4
  • 16
1
vote
1 answer

SpringCodegen generates class with JsonTypeInfo.As.EXISTING_PROPERTY instead of JsonTypeInfo.As.PROPERTY

One field is not showing anymore in the deserialization of the json. It happened because our code generator is transforming the OpenApi definition into this: @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY,…
1
vote
2 answers

Jackson databind blackbird module v2.12.1 support for Java8

I recently updated my jackson-databind module from 2.11.1 to 2.12.1 and in the documentation i found that it is recommended to use blackbird module instead of afterburner. But after upgaridng i am getting this…
1
vote
1 answer

How to get attribute value of nested element using jackson xml?

I appear to have run into a limitation of Jackson XML but wanted to ask the community first to see if I am missing something. Given the following xml: Some element value Is it…
1
vote
1 answer

Jackson + KotlinModule: Conflicting/ambiguous property name definitions (implicit name 'isFoo')

Stumbling through a strange behaviour in Jackson when used with KotlinModule. Trying to deserialize a JSON object with isXxx-Boolean and xxx-none-Boolean property. Any solution how to deal with this? data class FooObject( …
dnltsk
  • 1,037
  • 1
  • 8
  • 9
1
vote
1 answer

Jackson ParameterNamesModule

I found this method in the code: private MessageConverter makeJsonConverter() { var jsonConverter = new MappingJackson2MessageConverter(); var mapper = jsonConverter.getObjectMapper(); mapper.registerModule(new…
Stefan Dorn
  • 569
  • 2
  • 13
1
vote
2 answers

ObjectMapper configure GLOBAL LocalDateTime on Spring Java

I'm trying to achieve something absurdly simple, that is set the global time format to all json serialized in the spring boot application... I've tried many suggestions from other questions but it looks like jackson chooses to ignore whatever…
Rafael Lima
  • 3,079
  • 3
  • 41
  • 105
1
vote
2 answers

spring authorization server, use exit model for user

I have a model named Member, which implements UserDetails, but got exception when use it login. environment: JDK 17, spring boot 2.7.0, spring-authorization-server:0.3.0 Member model is like…
X Zhang
  • 29
  • 6
1
vote
1 answer

Using @JsonUnwrapped and having a custom Serializer (StdSerializer)

I need to write a custom Serializer for one of my entities "Payment" and I have to implement it by extending StdSerializer: class Payment { } class PaymentSerializer extends StdSerializer { public PaymentSerializer() { …
Kian
  • 211
  • 1
  • 3
  • 17
1
vote
1 answer

Jackson Mr Bean Bean Materializer support for toString implementation

I am using Jackson Mr Bean module to construct impl classes for defined interfaces. It works great, but one problem is that it does not generate an (overriden) implementation of toString() in the impl class resulting in the inability to use it for…
lmk
  • 654
  • 5
  • 21
1
vote
1 answer

Unit test failure on building of Jackson-Core Version 2.11.2

In the process of manually building the jackson-core module using the latest version of 2.11.2 I am encountering an error in the unit tests; which I'm assuming is due to a setting issue on my laptop. Steps Performed: Java Version -> 1.8 clone…
Ad Astra
  • 75
  • 1
  • 7
1
vote
1 answer

java.lang.ClassNotFoundException: com.fasterxml.jackson.module.scala.experimental.ScalaObjectMapper

I am trying to run a spark job. However everytime I try to get it to run locally it fails because of caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.module.scala.experimental.ScalaObjectMapper$class at…
nrvaller
  • 353
  • 6
  • 18