-
Jan 2nd, 2013, 01:36 AM
#1
Deserialization of object fails 415 (Unsupported Media Type)
I Have a Spring 3.1.2 MVC REST controller using Hibernate 4 Jackson 2
I have a method
public @ResponseBody Map<String,? extends Object> updateCase(@RequestBody CasdDTOWrapper data) throws Exception {
........
}
which has to read data of type CasdDTOWrapper but deserialization fails in
MappingJackson2HttpMessageConverter [ this.objectMapper.canDeserialize(javaType) returns false]
@JsonAutoDetect(fieldVisibility=JsonAutoDetect.Vis ibility.ANY)
public class CasdDTOWrapper {
private CasdDTO data;
public CasdDTO getData() {
return data;
}
@JsonSetter
public void setData(CasdDTO data) {
this.data = data;
}
}
Do i have to add some specific annotations ??
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules