package com.younike.hlpay.util;

import com.alibaba.fastjson.JSON;

/**
 * JSON工具类
 *
 * @author chenpengfei
 */
public class JSONUtil {

    public static String toJson(Object object) {
        return object == null ? "" : JSON.toJSONString(object);
    }

    public static <T> T fromJson(String json, Class<T> tClass){
        return JSON.parseObject(json, tClass);
    }
}
