diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java index ace94f9..70c88ed 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java @@ -1,6 +1,10 @@ package uulm.teamname.marvelous.gamelibrary.requests; +import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonKey; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage; import uulm.teamname.marvelous.gamelibrary.json.ingame.RequestDeserializer; @@ -9,7 +13,8 @@ import java.util.Objects; /** Represents an abstract request sent inside a {@link EventMessage} between client and server. */ @JsonDeserialize(using = RequestDeserializer.class) public abstract class Request { - public RequestType type; + + @JsonProperty("requestType") public RequestType type; @Override