Skip to content

Commit

Permalink
Add Jackson Afterburner module
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Schalanda committed Jan 6, 2015
1 parent 615077d commit 61f8943
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions graylog2-shared/pom.xml
Expand Up @@ -96,6 +96,10 @@
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
</dependency>

<dependency>
<groupId>io.netty</groupId>
Expand Down
Expand Up @@ -22,6 +22,7 @@
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.guava.GuavaModule;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import org.graylog2.shared.jackson.SizeSerializer;
import org.graylog2.shared.rest.RangeJsonSerializer;

Expand All @@ -38,10 +39,12 @@ public ObjectMapperProvider() {
objectMapper = new ObjectMapper()
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.setPropertyNamingStrategy(new PreserveLeadingUnderscoreStrategy())
.registerModule(new AfterburnerModule())
.registerModule(new JodaModule())
.registerModule(new GuavaModule())
.registerModule(new SimpleModule().addSerializer(new RangeJsonSerializer()))
.registerModule(new SimpleModule().addSerializer(new SizeSerializer()));
.registerModule(new SimpleModule()
.addSerializer(new RangeJsonSerializer())
.addSerializer(new SizeSerializer()));
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Expand Up @@ -344,11 +344,11 @@
<artifactId>jackson-module-jsonSchema</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- Jersey repackages ASM and this conflicts... :( dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-mrbean</artifactId>
<artifactId>jackson-module-afterburner</artifactId>
<version>${jackson.version}</version>
</dependency -->
</dependency>

<!-- Cmdline and configuration -->
<dependency>
Expand Down

0 comments on commit 61f8943

Please sign in to comment.