org.javers.java8support.MonthDayTypeAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
package org.javers.java8support;
import java.time.MonthDay;
import org.javers.core.json.BasicStringTypeAdapter;
class MonthDayTypeAdapter extends BasicStringTypeAdapter {
@Override
public String serialize(MonthDay sourceValue) {
return sourceValue.toString();
}
@Override
public MonthDay deserialize(String serializedValue) {
return MonthDay.parse(serializedValue);
}
@Override
public Class getValueType() {
return MonthDay.class;
}
}