JSON轉Object的方式

如下爲部分代碼片斷:web import com.alibaba.fastjson.JSONObject; Object obj = new Object(); //obj是一個有user相同屬性的對象 User user = JSONObject.parseObject(JSON.toJSONString(user), User.class); 這種方式會將對象中的Integer等類型的屬性值
相關文章
相關標籤/搜索