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

ru.fix.dynamic.property.jackson.PathSerializer Maven / Gradle / Ivy

There is a newer version: 2.0.8
Show newest version
package ru.fix.dynamic.property.jackson;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;

import java.io.IOException;
import java.nio.file.Path;

public class PathSerializer extends StdSerializer {

    public PathSerializer() {
        super(Path.class);
    }

    @Override
    public void serialize(Path value, JsonGenerator gen, SerializerProvider provider) throws IOException {
        gen.writeString(value.toString());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy