Questions tagged [jackson-modules]
177 questions
0
votes
1 answer
Jackson Parse String to Map throws java.lang.IllegalArgumentException. Explicit mapping using Jackson annotations or by providing a Mixin for UUID
I am creating an authorization server using Spring Security OAuth2 authorization framework and I am trying to map the OidcIdTokenClaims (Given Below) to Map.
OidcIdTokenClaims Sample…

Sebin Thomas
- 279
- 8
- 21
0
votes
0 answers
Java: Advice using deduction for type info when deserializing XML of polymorphic types with Jackson libraries
I have an abstract Java class AppSegment and two subclasses DnAppSegment and IpAppSegment. The base class has a member Set ports. Using Jackson libraries to (de)serialize to and from XML, when deserializing the XML string, I'm hitting…
0
votes
0 answers
Override deserializer with fields
I am trying to deserialize the RequestParameters class using a custom deserializer for the source field, but apparently jackson is only taking the deserializer annotated in the Source class (Source.Builder) not the one i registered…

Kapoa
- 1
- 1
0
votes
0 answers
Order of the variables when using com.fasterxml.jackson.databind.ObjectWriter
I'm having a class which used to convert POJO to json string and compare it with another json string(read from logs). Recently we added 2 new boolean parameters to json and POJO and now the order of those 2 newly added variables is getting vary time…

dilan madurapperuma
- 13
- 2
0
votes
0 answers
Exception: Scala module 2.14.1 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.13.2-1
I am getting the exception " Scala module 2.14.1 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.13.2-1" even though I have upgraded the Jackson Databind version tp 2.14.1 in the build.gardle file? How to…

Niharika Baruah
- 11
- 1
0
votes
0 answers
Custom Optional deserializer is not called when the objectmapper is registered with com.fasterxml.jackson.datatype.jdk8.Jdk8Module
I want a custom deserializer for optional, but the deserializer is not getting called when the jdk8 module is registered with the object mapper.
SerializationModule module = new SerializationModule();
module.addDeserializer(Optional.class, new…

Lahari Gulimi
- 11
- 2
0
votes
1 answer
Not able to register JavaTimeModule
I have a spring boot application with version 2.7.3.
I have a util class, that creates a new Object mapper and registers the Javatimemodule class to that.
So in the test case, I try to verify that the registered module is added to the mapper.
This…

Rohi
- 385
- 2
- 3
- 15
0
votes
1 answer
Adding custom Jackson Module to Spring boot's ObjectMapper is ignored
I use SpringBoot v2.2.2RELEASE (very old version) and I configured a custom Module as follow:
@Configuration
public class JacksonConfig {
@Bean
public Module jacksonModule() {
SimpleModule module = new SimpleModule();
…

Shvalb
- 1,835
- 2
- 30
- 60
0
votes
1 answer
How to use Jackson JsonParser to read json coming as input stream, from multiple threads, object by object?
I have a single inputstream of data, sending json. I want to read the data, object by object from multiple threads. The conventional single JsonParser is giving unwanted errors, as the nextToken() function gets invoked multiple times by multiple…

Pranav Mishra
- 15
- 1
- 5
0
votes
1 answer
Jackson: Deserialize date String `2022-05-18Z` error
When I try to deserialize date from this string format 2022-05-18Z in Jackson it throws this exception:
com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.LocalDate` from String "2022-05-18Z":…

Emilio Numazaki
- 836
- 1
- 5
- 25
0
votes
1 answer
Global jackson ObjectMapper not registering custom serializer
I am using Java 17, spring-boot 2.6.3 with spring-webflux and spring-consul dependencies and I have the following class:
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import…

Philippe Gioseffi
- 1,488
- 3
- 24
- 41
0
votes
1 answer
using jackson with module-info?
I can't for the life of me figure out how to include jackson in a java project using java modules.
I have tried a combination of using:
com.fasterxml.jackson.module
com.fasterxml.jackson.datatype
com.faster.xml.jackson.core
nothing…

dano
- 1
- 6
0
votes
1 answer
Spark EMR job jackson error - java.lang.NoSuchMethodError - AnnotatedMember.getType()Lcom/fasterxml/jackson/databind/JavaType
I know we have similar questions already answered here. but for some reason none of the options are working for me.
Below is the error i'm getting:
User class threw exception: java.lang.NoSuchMethodError:…

Rajashree Gr
- 519
- 1
- 9
- 18
0
votes
0 answers
How can I generate a single jSON schema from beans classes in Jackson?
How do i generate a single schema file from multiple beans in Jackson? My code currently spews out one single schema file per bean:
List klasses = new ArrayList<>();
ObjectMapper objectMapper = new ObjectMapper();
JsonSchemaGenerator…

Mridang Agarwalla
- 43,201
- 71
- 221
- 382
0
votes
0 answers
How can I exclude a field from the schema when generating schemas in Jackon?
I'm using Jackson's JsonSchemaGenerator to generate schemas for my beans. One of these beans have a getter that I would like to exclude from the schema generation (or alternatively, mark is as an "object" - not any).
How would I go about generating…

Mridang Agarwalla
- 43,201
- 71
- 221
- 382