net.optionfactory.hj.JsonDriver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-json Show documentation
Show all versions of hibernate-json Show documentation
Custom Hibernate types for serializing fields as JSON, using either jackson or gson
package net.optionfactory.hj;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
/**
*
* @author rferranti
*/
public interface JsonDriver {
Object deserialize(String value, TypeDescriptor type);
Object deserialize(String value, Type type);
String serialize(Object value, TypeDescriptor type);
String serialize(Object value, Type type);
TypeDescriptor fieldType(Field field, Class> context);
}