Skip to content

Include GsonHttpMessageConverter in Spring MVC [SPR-11460] #16086

Closed
@spring-projects-issues

Description

@spring-projects-issues

Manish opened SPR-11460 and commented

I am working on a number of projects that use GSON for JSON serialization. However, in the web layer we are using Jackson 2 for similar purposes.

It will be good if the class GsonHttpMessageConverter from the Spring Android REST project were to be made available with Spring MVC core as then we would be able to avoid two different libraries in the same project.

Other desirable features of GSON are:

  1. Single JAR compared to at least 3 Jackson-2 JARs (annotations, core, databind);
  2. Smaller JAR footprint (186K v/s 35K + 194K + 893K);
  3. GSON does not serialize fields with null values, Jackson does (```
    { }
```{ "middleName" : null }
```).

Affects: 4.0 GA, 4.0.1, 4.0.2

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions