
top.jfunc.common.converter.Json2BeanConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
common utils like IOUtil,StrUtil,HoldProcessor.etc.
package top.jfunc.common.converter;
import top.jfunc.json.JsonObject;
import top.jfunc.json.impl.JSONObject;
/**
* Json String -> JavaBean
* 此类也示范了统一json的好处
* cn.zytx.common.json.JsonObject
* cn.zytx.common.json.impl.JSONObject
* ,只需要在build.gradle中修改引用就能改变json的实现
* @author xiongshiyan at 2018/7/16
*/
public class Json2BeanConverter implements Converter{
@Override
public R convert(String src, Class clazz){
JsonObject json = new JSONObject();
return json.deserialize(src, clazz);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy