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

top.jfunc.common.converter.Json2BeanConverter Maven / Gradle / Ivy

There is a newer version: 1.8.5
Show newest version
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