Skip to content

Commit

Permalink
Latest versions of dependencies.
Browse files Browse the repository at this point in the history
Also a fix to our deserializer so it won't fail when we add new fields to our REST endpoints.
  • Loading branch information
RyanLCox1 committed Nov 7, 2022
1 parent 744146b commit d311fa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.6.1</version>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.3</version>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/smartystreets/api/SmartySerializer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.smartystreets.api;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.*;
Expand All @@ -18,6 +19,7 @@ public byte[] serialize(Object obj) throws IOException {
public <T> T deserialize(byte[] payload, Class<T> type) throws IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return mapper.readValue(payload, type);
}
}

0 comments on commit d311fa0

Please sign in to comment.