apoc.export.util.DurationValueSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apoc-common Show documentation
Show all versions of apoc-common Show documentation
Data types package for Neo4j Procedures
package apoc.export.util;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.neo4j.values.storable.DurationValue;
import java.io.IOException;
public class DurationValueSerializer extends JsonSerializer {
@Override
public void serialize(DurationValue value, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
if (value == null) {
jsonGenerator.writeNull();
}
jsonGenerator.writeString(value.toString());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy