diff --git a/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/pom.xml b/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/pom.xml
index ece9707f6ec..4fc9abe0541 100644
--- a/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/pom.xml
+++ b/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/pom.xml
@@ -98,8 +98,8 @@
commons-codec
- com.google.code.gson
- gson
+ com.fasterxml.jackson.core
+ jackson-databind
org.slf4j
diff --git a/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/geo/topic/gazetteer/GeoGazetteerClient.java b/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/geo/topic/gazetteer/GeoGazetteerClient.java
index e1965c937f8..b6a98a7eddc 100644
--- a/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/geo/topic/gazetteer/GeoGazetteerClient.java
+++ b/tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/geo/topic/gazetteer/GeoGazetteerClient.java
@@ -16,13 +16,14 @@
*/
package org.apache.tika.parser.geo.topic.gazetteer;
-import java.lang.reflect.Type;
+import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Map;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
@@ -42,6 +43,10 @@ public class GeoGazetteerClient {
private static final Logger LOG = LoggerFactory.getLogger(GeoGazetteerClient.class);
+ // gson ignored fields Location doesn't have
+ private static final ObjectMapper MAPPER =
+ new ObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+
private String url;
/**
@@ -74,11 +79,7 @@ public Map> getLocations(List locations) {
HttpResponse resp = httpClient.execute(httpGet);
String respJson = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
- @SuppressWarnings("serial") Type typeDef =
- new TypeToken