/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.zuoxiaolong.blog.common.utils;

import com.google.gson.Gson;

import java.lang.reflect.Type;

/**
 * 简单封装Jackson，实现JSON String<->Java Object的Mapper.
 * @author ThinkGem
 * @author Xiaolong Zuo
 * @since 1.0.0
 */
public interface JsonUtils {

	Gson GSON = new Gson();

    static String toJson(Object object) {
        return GSON.toJson(object);
    }

    static <T> T fromJson(String jsonString, Class<T> clazz) {
        if (StringUtils.isEmpty(jsonString)) {
            return null;
        }
        return GSON.fromJson(jsonString, clazz);
    }

    static <T> T fromJson(String jsonString, Type type) {
        if (StringUtils.isEmpty(jsonString)) {
            return null;
        }
        return (T) GSON.fromJson(jsonString, type);
    }

}

@@ -227,55 +227,24 @@
 %0A * 
-%E7%AE%80%E5%8D%95%E5%B0%81%E8%A3%85Jackson%EF%BC%8C%E5%AE%9E%E7%8E%B0JSON String%3C-%3EJava Object%E7%9A%84Mapper.
+%E4%BD%BF%E7%94%A8GSON%E4%BD%9C%E4%B8%BAJson%E8%BD%AC%E6%8D%A2%E5%B7%A5%E5%85%B7
 %0A * 

删除Cache和SDK模块.