diff options
Diffstat (limited to 'src/Server/JSONMessage.java')
-rw-r--r-- | src/Server/JSONMessage.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Server/JSONMessage.java b/src/Server/JSONMessage.java new file mode 100644 index 0000000..c3f9712 --- /dev/null +++ b/src/Server/JSONMessage.java @@ -0,0 +1,19 @@ +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; + } +} |