package Server; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Map; public class JSONMessage { private Map data; public JSONMessage(String json) throws JsonProcessingException { ObjectMapper mapper = new ObjectMapper(); data = mapper.readValue(json, Map.class); } public Map getData() { return data; } }