Using TomEE 7.0.0M1 with JAX-RS service that returns a list of objects that
has a list of enums. The enums are returned as "declaringClass":
"com.someplace.SomeClass" instead of the list of values:
"recordedEventAttributes": {
"actualDuration": 1800,
"actualStartTime": 0,
"contentRating": "TV_PG",
"estimatedDeletionTime": -1,
"eventFlags": [{
"declaringClass": "com.someplace.SomeClass"
}, {
"declaringClass": "com.someplace.SomeClass"
}, {
"declaringClass": "com.someplace.SomeClass"
}],
"saveUntil": "UNTIL_SPACE_NEEDED",
"starRating": "NOT_RATED"
}
But if I add:
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.6.4</version>
</dependency>
It works:
"recordedEventAttributes": {
"actualDuration": 1800,
"actualStartTime": 0,
"contentRating": "TV_PG",
"estimatedDeletionTime": -1,
"eventFlags": ["STEREO", "NEW_RELEASE", "HDTV",
"CLOSED_CAPTIONED"],
"saveUntil": "UNTIL_SPACE_NEEDED",
"starRating": "NOT_RATED"
}
My question is shouldn't Johnzon handle this? Why doesn't this work in TomEE
out of the box?
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Jackson-required-to-marshal-correctly-tp4677540.html
Sent from the TomEE Users mailing list archive at Nabble.com.