summaryrefslogtreecommitdiffstats
path: root/utils/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'utils/src/main')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
index 69a211b6..1c65be82 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
@@ -38,6 +38,7 @@ import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
+import org.onap.policy.common.gson.MapDoubleAdapterFactory;
/**
* JSON encoder and decoder using the "standard" mechanism, which is currently gson.
@@ -47,8 +48,9 @@ public class StandardCoder implements Coder {
/**
* Gson object used to encode and decode messages.
*/
- private static final Gson GSON = new GsonBuilder()
- .registerTypeAdapter(StandardCoderObject.class, new StandardTypeAdapter()).create();
+ private static final Gson GSON =
+ new GsonBuilder().registerTypeAdapter(StandardCoderObject.class, new StandardTypeAdapter())
+ .registerTypeAdapterFactory(new MapDoubleAdapterFactory()).create();
/**
* Constructs the object.