diff options
Diffstat (limited to 'src/eu/equalparts/cardbase/utils')
-rw-r--r-- | src/eu/equalparts/cardbase/utils/JSON.java | 6 |
1 files changed, 6 insertions, 0 deletions
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; } } |