package com.ydl.ydlcommon.data.http


/**
 * map 工具类
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/01/31
 */
object MapUtils {

    // javabean 转 map
    @JvmStatic
    fun <T>bean2Map(t: T): HashMap<String, String> {
        val json = GsonProvider.getGson().toJson(t)
        return GsonProvider.getGson()
            .fromJson<HashMap<String, String>>(json, HashMap::class.java)
    }

}