package com.alterdekim.game.xml;

import com.alterdekim.game.component.game.RoleFlags;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;

public class RoleFlagsDeserializer extends JsonDeserializer<RoleFlags> {
    @Override
    public RoleFlags deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
        Integer i = jsonParser.readValueAs(Integer.class);
        return RoleFlags.fromId(i);
    }
}
