package com.alterdekim.game.xml;

import com.alterdekim.game.component.game.ClubAccessType;
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 ClubAccessTypeSerializer extends JsonSerializer<ClubAccessType> {
    @Override
    public void serialize(ClubAccessType clubAccessType, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeNumber(clubAccessType.getValue());
    }
}
