Skip to content

HttpMessageConverter doesn't support typed collections [SPR-8381] #13028

Closed
@spring-projects-issues

Description

@spring-projects-issues

David Parks opened SPR-8381 and commented

HttpMessageConverter can't support conversion to typed collections.

Example: Use JacksonJsonMessageConverter to convert a json string to a Collection<Pojo> objects.

Since only a Class<? extends T> is specified, there's no way to declare both the type (Pojo.class) and the object (Collection.class).

Jackson classes support this using a TypeReference class (see: http://wiki.fasterxml.com/JacksonInFiveMinutes#Data_Binding_with_Generics)

Also, MappingJacksonJsonMessageConverter (line 104) is using a deprecated method of the current release of Jackson.


Affects: 3.0.5

Reference URL: http://stackoverflow.com/questions/6173182/spring-json-convert-a-typed-collection-like-listmypojo

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions