aboutsummaryrefslogtreecommitdiff
path: root/src/Server/JSONMessage.java
blob: c3f97121edd0fcf1806a1a5c0746eceb7ebea63f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
    }
}