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

org.onetwo.common.jackson.JsonConvertable Maven / Gradle / Ivy

The newest version!
package org.onetwo.common.jackson;

import java.util.HashMap;
import java.util.Map;

/**
 * @author weishao zeng
 * 
*/ public interface JsonConvertable { Object getConvertableValue(); default T asJson(Class clazz) { return JsonMapper.IGNORE_EMPTY.fromJson(getConvertableValue(), clazz); } default Map asMap() { return JsonMapper.IGNORE_EMPTY.fromJson(getConvertableValue(), HashMap.class); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy