Questions tagged [jackson-modules]
177 questions
0
votes
2 answers
Problem combining delta.io and spark-bigquery 0.15.x-beta
I am trying to update my code to the new spark-bigquery connector to 0.15.{0,1}-beta
and I got that delta format is not working anymore.
I cannot read or write using delta form.
Here you can find a minimal example for writing a dataframe using delta…

Alfonso Sastre
- 53
- 4
0
votes
1 answer
Do I need to register JavaTimeModule while using JDK 11?
I just found out that when I used JDK 8 I had to register JavaTimeModule to add support for java.time API.
@Bean
public ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
…

dvelopp
- 4,095
- 3
- 31
- 57
0
votes
1 answer
How to design multiple objects as shown in JSON mapping under same class?
I have a requirement where I need to implement a JSON response like below,
{
"group":{
"name": "MyGroup"
}
"members": {
"member1" : {
"memberCity": "Mumbai",
"memberName": "Ajay"
},
"member2" : {
"memberCity":…

WebNoob
- 237
- 6
- 16
0
votes
1 answer
Read string as Level from csv
I have a csv that looks like the following:
code ,level,name ,description
COM-0001,ERROR,Invalid Name,Name can not have digits
COM-0002,WARN ,Unusual Name,Name - {} was unusual
...
And I want to read the second (level) value as…

dawit
- 195
- 1
- 3
- 15
0
votes
1 answer
Jackson object mappers mixin breaks springboot list response from controller
I have the following situation where i have multiple MappingJackson2HttpMessageConverter both of them using a shared ObjectMapper that has a single mixin added on it.
@Bean
public ObjectMapper objectMapper(){
ObjectMapper objectMapper = new…

Charles
- 570
- 11
- 29
0
votes
1 answer
Jackson MRBean not working, Cannot construct instance
I have this code:
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());
objectMapper.registerModule(new MrBeanModule());
and this testcase:
SearchResultContainer src = objectMapper.readValue("{}",…

Alex R
- 11,364
- 15
- 100
- 180
0
votes
0 answers
Jackson from Json throw exception when converting empty son
In scala, I am trying to convert json back to case class but the json sometimes contains empty string. In those cases, it throws:
com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class Person] value failed: null
…

user3407267
- 1,524
- 9
- 30
- 57
0
votes
4 answers
kotlin : cannot parse string to enum with Jackson
I use the lib jackson-module-kotlin to parse string of json into object.
My issue is when I parse a string into an enum , and when I launch with intellij, I have this stack trace:
Caused by:…

sab
- 4,352
- 7
- 36
- 60
0
votes
1 answer
jackson AfterburnerModule gives a warning in the log
After enabling AfterburnerModule I am seeing the below warning message in the logs. Without AfterburnerModule everything works fine.
Sep 06, 2017 9:11:39 AM com.fasterxml.jackson.module.afterburner.deser.BeanPropertyMutator _reportProblem
WARNING:…

anuj
- 201
- 5
- 16
0
votes
1 answer
Spring MVC date format output using MappingJackson2HttpMessageConverter
I have a date DTO:
public class SampleDTO{
Date date;
//setter, getter, constructor
}
In Spring MVC, I make it in ModelAttribute and sent:
@ModelAttribute("sample")
public SampleDTO getSample() {
return new SampleDTO(new…

vincent zhang
- 444
- 5
- 20
0
votes
1 answer
Imported Git Repository but some imports are not found?
I have a Git Repository that I imported into Eclipse but it has some import errors.
I'm using Spring Redis version 1.8.4 and following their examples on how to do object mapping. I used the Jackson Mapper link and then followed that to the…

codeCooker
- 145
- 2
- 14
0
votes
1 answer
Custom Jackson serialization in library
I'm writing a Spring boot application that uses RestController to expose one resource. The only resource, MainResource, is something like this:
String id;
String title;
List tags;
ComplexGraphObject gObject;
To make this work I wrote DTOs…

jam01
- 124
- 7
0
votes
1 answer
Must we use @JsonProperty in Scala case classes?
everyone.
This seems to be quite an unnecessary exercise to define the @JsonProperty annotations for Json serialization of a case class. For example:
case class Foo @JsonCreator()(
@JsonProperty("a") a: String,
@JsonProperty("b") b: Boolean,
…

silverberry
- 786
- 5
- 20
0
votes
1 answer
Stop jackson-scala-module serializing all fields by default
Using DefaultObjectMapper from jackson-scala-module, in the following examples, field is serialised in the Scala version, but not in the Java version. Setting com.fasterxml.jackson.databind.MapperFeature.AUTO_DETECT_FIELDS has no effect.
I wish for…

oal
- 411
- 5
- 15
0
votes
1 answer
How to change the data fomat of the JSON node while serializing and deserializing in jackson
I have following Incoming json, which I deserialize to Model.java and then copy that java object to ModelView.java. I wan't to convert date from String to milliseconds and send the Outgoing json as response.
How do I go for it ?
I've specific…

advaita
- 87
- 1
- 13