package com.common.lib_base.utils;

import com.google.gson.Gson;

/**
 * Date: 2022/12/15 0015 11:35
 * Description:
 */
public class GsonUtils<T> {


    static Gson gson = new Gson();


    /**
     *
     * @param data
     * @return
     */
//    public static String toJson(T data) {
//        String s = gson.toJson(data);
//        return s;
//    }



    // json转String
//    String s = gson.toJson(resultData);

    // String转json
//    ProjectInfoDetailResultBean projectInfoDetailResultBean = gson.fromJson(s, ProjectInfoDetailResultBean.class);

    // 字符串转list
//    Type type = new TypeToken<List<TeamIntroResultBean.TeamEquipmentsBean>>() {}.getType();
//    List<TeamIntroResultBean.TeamEquipmentsBean> teamEquipments = gson.fromJson(equipmentsTreeStr, type);


}
