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

com.dahuatech.icc.util.BeanUtil Maven / Gradle / Ivy

package com.dahuatech.icc.util;

import com.dahuatech.hutool.core.lang.TypeReference;
import com.dahuatech.hutool.json.JSONUtil;

/**
 * json-bean 工具类
 *
 * @author 232676
 * @since 1.0.0 2020-10-24 20:59:11
 */
public class BeanUtil {

  public static  T toBean(String jsonString, TypeReference typeReference) {
    return JSONUtil.toBean(jsonString, typeReference.getType(), true);
  }

  public static  T toBean(String jsonString, Class t) {
    return JSONUtil.toBean(jsonString, t);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy