Category "jackson"

how to serialize String/null as json in quarkus?

quarkus serialize String as plain string, null as empty body(with http code 204) "foo" -> foo null -> (empty body) how to make it serialize String and nul

Spring doesn't load JavaTimeModule after Spring Update just load legacy one

I updated my project from spring boot 2.3.8 to 2.6.7 and I upgrade the jackson version to 2.13.2 I set the JavaTimeModule like this: @Bean @Primary public Obj

Error while parsing, when loading the data from snowflake having array datatype

I am trying to read data from snowflake and load it to other storage location. I am using snowflake jdbc driver 3.12.9 to read the data and jackson library(2.10

Serializing multiline string from JsonNode to YAML string adds double quotes and "\n"

I have a YAML string where one of the attributes looks like this: description: | this is my description //imagine there's a space after description th

SpringBoot: Enabling WRAP_ROOT_VALUE feature using custom Jackson2ObjectMapperBuilder shuts off Swagger3

I've read many articles/threads and what not about how to enable Jackson's WRAP_ROOT_VALUE feature in SpringBoot (v2.2.2RELEASE) and none of them really work, u

Getting conversion issue after migrating jackson-databind from 2.11.4 to 2.12.13.2

We have recently migrated jackson-databind from 3.11.4 to 3.12.13.2 version and springframework from 5.2.19.RELEASE to 5.2.22.RELEASE. after the migration we s

LinkageError: loading constraint violation when overriding method javax/xml/stream/XMLInputFactory.createXMLEventReader

I'm upgrading an application that's hosted on WebSphere 9 running IBM JDK 8 from Spring 4.0.3 to 5.3.18. While doing so I updated the project's Jackson, Woodsto

org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: java.lang.String cannot be cast to java.lang.Enum

I have a Spring boot application. spring-boot-starter-parent 2.3.0.RELEASE I'm trying to get a list of objects and expect to get something like this: { "i

Serialising order annotations for XML on Jackson does not work

I already googled this problem for almost a day and tried several fixes (including 4 or 5 from StackOverflow) but none of them worked. I have this POJO with ann

How can I create immutable DTOs using Jackson but without annotions?

Jackson can deserialize JSON data into immutable objects. But by default the constructor or static factory method parameters have to be specified either using @

How to deserialise a field and tell the difference between the value being null or absent?

When I am deserialising into my class, for some fields, I would like to be able to tell the difference between the value being absent, or null. For example, {"i

Scala Jackson deserialization failing with "non-static inner classes" error version Jackson2.10

I am trying to upgrade from Jackson-2.5 to 2.10 Below deserialization code was working for me, before but post upgrade the solution is failing with following er

Creating a JAVA Object from XML using Jackson XML for multiple elements with same TAG

I have the following XML Structure which I am using to create a Java Object. <TABLE NAME="AB" ID="10" CODE="ABC123" RANK="102" YEAR="2022" TIMESTAMP="

JsonProperty in java

I found this question in other questions, but I think they are too old and they are not working anymore. I'm consuming an external service that returns a JSON a

What should be @JsonFormat(pattern="") in Spring-boot for given example

Using Spring-boot RESTful service,in that receiving JSON file which contain DateTime in following format "2017-08-16T16:08:25.000Z" and JsonFormat tries are e.g

CustomDeserializer has no default (no arg) constructor

I am consuming a REST Api with RestTemplate. The response I'm getting from the API has lots of nested objects. Here's a little snippet as an example: "formular

Restructure JSON before deserializing with Jackson

We have a service which currently consumes JSON. We want to slightly restructure this JSON (move one property one level up) but also implement graceful migratio

Sending protobuf as JSON in spring-boot

I´m using protobufs with this concrete definition. message Hash { string category = 1; repeated KVPair content = 2; } message KVPair { strin

Jackson deserializer for generic type

I need to write a custom deserializer for a class with generics. I couldn't find a way to do this, however I cannot imagine I'm the only one with this problem.

Jackson version conflict in groovy

When I run the code below using groovy 3.0.2 I get an error because groovy/lib dir already has some older version of jackson and for some reason some of them ge