aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index d859e91bb..6983e32f6 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -15,6 +15,7 @@
*/
package org.traccar;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.ning.http.client.AsyncHttpClient;
import java.net.InetAddress;
@@ -65,6 +66,12 @@ public final class Context {
return loggerEnabled;
}
+ private static ObjectMapper objectMapper;
+
+ public static ObjectMapper getObjectMapper() {
+ return objectMapper;
+ }
+
private static IdentityManager identityManager;
public static IdentityManager getIdentityManager() {
@@ -181,6 +188,8 @@ public final class Context {
Log.setupLogger(config);
}
+ objectMapper = new ObjectMapper();
+
if (config.hasKey("database.url")) {
dataManager = new DataManager(config);
}