diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java index a01af72..cf35971 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java @@ -12,13 +12,9 @@ import uulm.teamname.marvelous.gamelibrary.IntVector2; import java.io.IOException; public class IntVector2Deserializer extends JsonDeserializer { - - // static so that no reinitializations are needed - private static final ObjectMapper mapper = new ObjectMapper(); - @Override public IntVector2 deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - var values = mapper.readValue(p, Integer[].class); + var values = p.readValueAs(Integer[].class); IntVector2 result = new IntVector2(values[0], values[1]); return result; }