package com.changfa.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.List;

/**
 * 系统公用方法
 *
 **/
public class CommonUtils {

    public static <T> T convert(Object object, Class<T> c) {
        return JSONObject.parseObject(JSONObject.toJSONString(object), c);
    }

    public static <T> List<T> convertList(Object object, Class<T> c) {
        return JSON.parseArray(JSONObject.toJSONString(object), c);
    }







}
