package com.alterdekim.game.xml;

import com.alterdekim.game.component.game.RoleFlags;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class RoleFlagsSerializer extends JsonSerializer<RoleFlags> {
    @Override
    public void serialize(RoleFlags roleFlags, JsonGenerator generator, SerializerProvider provider) throws IOException {
        generator.writeNumber(roleFlags.getValue());
    }
}
