All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.eldoria.eldoutilities.config.parsing.serializer.LevelSerializer Maven / Gradle / Ivy

The newest version!
/*
 *     SPDX-License-Identifier: LGPL-3.0-or-later
 *
 *     Copyright (C) EldoriaRPG Team and Contributor
 */

package de.eldoria.eldoutilities.config.parsing.serializer;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;
import java.util.logging.Level;

public class LevelSerializer extends JsonSerializer {
    @Override
    public void serialize(Level value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
        gen.writeString(value.getName());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy