From 8f8e6e147f0278ed49633a00985dfbbefff8d5f4 Mon Sep 17 00:00:00 2001 From: vlofgren Date: Sat, 22 Oct 2022 14:42:37 +0200 Subject: [PATCH] Fix JSON serialization error --- .../src/main/java/nu/marginalia/wmsa/client/GsonFactory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/marginalia_nu/src/main/java/nu/marginalia/wmsa/client/GsonFactory.java b/marginalia_nu/src/main/java/nu/marginalia/wmsa/client/GsonFactory.java index 02615ca9..c0af0c12 100644 --- a/marginalia_nu/src/main/java/nu/marginalia/wmsa/client/GsonFactory.java +++ b/marginalia_nu/src/main/java/nu/marginalia/wmsa/client/GsonFactory.java @@ -24,6 +24,7 @@ public class GsonFactory { .registerTypeAdapter(EdgeDomain.class, (JsonDeserializer) (json, typeOfT, context) -> new EdgeDomain(json.getAsString())) .registerTypeAdapter(EdgeId.class, (JsonDeserializer>) (json, typeOfT, context) -> new EdgeId<>(json.getAsInt())) .registerTypeAdapter(EdgeId.class, (JsonSerializer>) (src, typeOfSrc, context) -> new JsonPrimitive(src.id())) + .serializeSpecialFloatingPointValues() .create(); } }