ru.fix.dynamic.property.jackson.PathSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamic-property-jackson Show documentation
Show all versions of dynamic-property-jackson Show documentation
https://github.com/ru-fix/dynamic-property
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