Questions tagged [jackson-modules]
177 questions
0
votes
2 answers
Jackson JSON Schema generator for Joda date time
I am using Jackson JSON schema module version 2.7.4 to generate JSON schema for some of my classes. In my classes, I have used Joda DateTime object. The schema for this object is generated with all it's properties exploded (as shown below). Is it…

Niranjan
- 2,601
- 8
- 43
- 54
0
votes
1 answer
Karaf not able to load Afterburner classes during runtime
I am trying to use AfterBurner in a Karaf 3.0.5 (with default felix) using Java 1.8.
In the same code base in one place it is working perfectly fine and in one place it is failing. The code where it is working looks like something like below (and is…

tuk
- 5,941
- 14
- 79
- 162
0
votes
1 answer
com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class car.Part]
I'm trying to deserialize this XML into a Parts object:
gearbox
1990
wheel
2000
…

Hooli
- 1,135
- 3
- 19
- 46
0
votes
1 answer
Jackson Deserialization fails with Map
I have created a simple test case that shows the error. Please let me know if I've missed something.
I have a simple interface that declares a single accessor:
public class JacksonParsingTest {
public interface EventWithMap {
…

Robin Coe
- 750
- 7
- 28
0
votes
1 answer
Setting Default Type Deserializer at the Mapper/Package/Class Level in Jackson 2x
If you need multiple deserializers for a type (packaged in one or more modules), how does Jackson determine which is the primary deserializer for that type? Is it random? If not, can the default be set by package/class?
It would obviously be a…

THX1138
- 1,518
- 14
- 28
0
votes
1 answer
Serialization and Deserialization of JodaTime dates as json
According to the documentation found here https://github.com/FasterXML/jackson-datatype-joda
the following code snippet should pass
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JodaModule());
final String INPUT_JSON =…

netbrain
- 9,194
- 6
- 42
- 68
0
votes
1 answer
Generic parsing inconsistent response with Jackson into String or custom Object
I get two different kind of response json in two different scenario from single RESTful web service, how to parse the following response json with Jackson??
response:{
result:"0"
}
and
response:{
result :{
fname: "abc",
lname:…

Shridutt Kothari
- 7,326
- 3
- 41
- 61
0
votes
0 answers
Add custom DeserializerFactory to Jackson 2 ObjectFactory
I'm attempting to upgrade from Jackson 1.x to 2.x.
One area I'm having problems is where I was using a custom DeserializerFactory it looked like this:
objectMapper.setDeserializerProvider(objectMapper.getDeserializerProvider()
…

ryber
- 4,537
- 2
- 26
- 50
0
votes
0 answers
Java Jackson: deserialize Generic type
I am trying to deserialize a class TrainingData as shown below. TrainingData uses gnerics and one of its attributes is declared in its super class. When I try deserializing a JSON string to construct a TrainingData object, I get the following…

Darth.Vader
- 5,079
- 7
- 50
- 90
0
votes
1 answer
Jackson Json serialization
I'm using Jackson 2.4 and I need to generate data to be process by d3.js.
d3.js want my json values to be format like this :
values : [[0, 13.5],[1, 2.5],[2, 5],[3, 41.2]]
In my Java model I have :
public class Series {
private String key;
…

Julien Deruere
- 770
- 1
- 7
- 11
0
votes
1 answer
Jackson ObjectMapper Conversion Issue with d3js Country JSON
I want to deserialize this JSON list from Github using Jackson API.
It is causing exception when started to use the array inside array. Can any any body help to learn this Mapping .
{
"type":"Topology",
"objects":{
"countries":{
…

San
- 83
- 1
- 1
- 5
0
votes
1 answer
How can i influence instance creation for annotated serializers
I wrote a jackson module to enable a specific type of serialization. Now i want to enable global configuration of one of the new serializers. so i have to set a property on a serializer instance during creation.
Is there a way i can do that from…

Laures
- 5,389
- 11
- 50
- 76