json示例 { "dsttl3.cn": "https://www.dsttl3.cn", "new": "new", "001": "001" } Entity //需引入gson包 import com.google.gson.annotations.SerializedName; // @SerializedName("dsttl3.cn") //dsttl3.cn 为key String dsttl3_cn; @SerializedName("new") String _new; @SerializedName("001") String _001;
Gson 解析json时遇到key是数字,关键字,key中带小数点等问题的解决办法