From 19800a0886d51220f28f85f3845c74e7f46500e3 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sat, 26 Mar 2016 14:16:42 +0100 Subject: Refactored storage hierarchy, now need to look into decks again --- src/eu/equalparts/cardbase/utils/JSON.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/eu/equalparts/cardbase/utils') diff --git a/src/eu/equalparts/cardbase/utils/JSON.java b/src/eu/equalparts/cardbase/utils/JSON.java index 17e8392..4a21311 100644 --- a/src/eu/equalparts/cardbase/utils/JSON.java +++ b/src/eu/equalparts/cardbase/utils/JSON.java @@ -1,6 +1,7 @@ package eu.equalparts.cardbase.utils; import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; /** @@ -30,6 +31,11 @@ public final class JSON { ObjectMapper objectMapper = new ObjectMapper(); // classes don't necessarily use all json fields objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + // disable auto detection + objectMapper.disable(MapperFeature.AUTO_DETECT_CREATORS, + MapperFeature.AUTO_DETECT_FIELDS, + MapperFeature.AUTO_DETECT_GETTERS, + MapperFeature.AUTO_DETECT_IS_GETTERS); return objectMapper; } } -- cgit v1.2.3