Questions tagged [jackson-modules]
177 questions
2
votes
0 answers
Springboot with Localdatetime and resteasy client
I using springboot to return one LocalDateTime and LocalDate parameter, so in my back I put:
org.hibernate
hibernate-java8
5.0.12.Final
…

Fabio Ebner
- 2,613
- 16
- 50
- 77
2
votes
1 answer
Spring and MappingJackson2HttpMessageConverter and registerModule
We are using the latest Spring 4.2.x and we recently went from Jackson Mapper 2.6.3 to 2.8.8, and now we are registering Modules.
Here is part of what or spring-servlet.xml looks like:

tjholmes66
- 1,850
- 4
- 37
- 73
2
votes
2 answers
Unexpected token (END_OBJECT), expected FIELD_NAME: missing property '@type'
I am getting below exception during deserialization , the guest profile is a nested object within the Root object (few levels within it). i dont have control over how it is serialized since I am only the consumer of this message from a kafka topic. …

user2221654
- 311
- 1
- 7
- 20
2
votes
1 answer
marshal Object to CSV
I'm trying to marshal an Object into a csv String. I have created a method that can convert any object into a csv String but I keep getting the exception:
java.lang.NoSuchMethodError:…

Hooli
- 1,135
- 3
- 19
- 46
2
votes
1 answer
Extract part of json string with streaming api and convert to a jsonTree (Jackson)
I have a nested json structure:
"info": [
{
"name":"Alice",
"phone": [{
"home": "1234567890",
"mobile": "0001112223"
}]
},
{
"name":"Bob",
"phone": [{
"home":…

John
- 53
- 1
- 6
2
votes
3 answers
How to do deep merge JSON in jackson 2?
I am using Jersey and Jackson2 to development a Restful API. We have a problem when we development PUT method. Our PUT method is kind of like PATCH method. It will only updates the properties received in the request body.
I am using…

crisli
- 552
- 1
- 6
- 17
2
votes
1 answer
How to get Jackson to use a Google Guice Injector to create instances?
We use Google Guice for DI (mostly with constructor injection) and Jackson for object serialization to/from JSON. As such we build our object graph through Guice Modules.
How do we provide/instruct Jackson to use our pre-built Guice Injector? Or…

peterl
- 1,881
- 4
- 21
- 34
2
votes
1 answer
Generating json-schema for customly serialized beans
I'm building json-schema from my POJO using FasterXML's json-schema generator.
Everything goes OK until my POJO uses custom json serialization. In my case I have a field of type org.joda.Money and I serialize it with a corresponding joda-module. The…

Alexey Pomelov
- 196
- 1
- 9
2
votes
1 answer
Migrating from Jackson-Module-Scala 2.4 to 2.5
I'm using jackson-module-scala 2.4 successfully with the wrapper below to serialize and deserialize various complex objects. When changing to jackson-module-scala 2.5 many deserializations (JSON to object) fail. For instance, the deserialization of…

jans
- 1,768
- 3
- 17
- 22
2
votes
0 answers
Exception while trying to run Spark app with JSON parsing
I have a simple Spark application with Scala and SBT. First I tried to do the following:
run sbt clean package
run spark-submit --class Main ./target/scala-2.11/sparktest_2.11-1.0.jar
but it fails with the following exception:
Exception in thread…

ale64bit
- 6,232
- 3
- 24
- 44
2
votes
2 answers
Jackson Java 8 DateTime serialisation
Jackson operates java.time.Instant with WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS (READ_ as well) enabled by default.
jackson-datatype-jsr310
It produces JSON like this
{ "createDate":1421261297.356000000, "modifyDate":1421261297.356000000 }
In…

Andrii Karaivanskyi
- 1,942
- 3
- 19
- 23
2
votes
1 answer
Jackson ObjectMapper treats "long" java types as "number" instead of "integer"
Using org.codehaus.jackson.map.ObjectMapper (NOT the databind version!) I'm generating a json schema from the following object:
public class MyModelObject {
private long fileSize;
//... other properties, getters, setters etc
}
Using the…

StormeHawke
- 5,987
- 5
- 45
- 73
2
votes
1 answer
CsvParser "No suitable constructor found for type"
I'm trying to read a simple CSV file using the Jackson CsvParser.
I've followed the tutorial, but I keep getting the following error:
com.fasterxml.jackson.databind.RuntimeJsonMappingException: No suitable constructor found for type [simple type,…

Gep
- 848
- 13
- 29
2
votes
2 answers
Jackson update part of object
This is what I am trying to do. lets say I have 2 json inputs.
First
{"testArr":[{"name":"name1"},{"name":"name2"}]}
Second
{"testArr":[{"name":"name1Changed"}]}
And I have classes
class test{
public String name;
}
class runner{
public…

Andrius Juskevicius
- 21
- 1
- 3
2
votes
1 answer
Generate a custom JSON Schema in JAVA using Jackson
I'm new to this and struggling for the use cases when a POJO/Bean has nested parameters in it.
Requirement -
Generate a JSON schema using Jackson(latest versions are OK) for a JAVA Bean/POJO class, such that it includes the structure of nested…

Piyush Jajoo
- 1,095
- 2
- 18
- 27