java json字符串轉JSONObject對象、轉JAVA對象、轉List 對象


轉JsonObject:

Object region = JSONObject.parse(regions.toString());

轉對象:

BStationRegion stationRegion = JSONObject.parseObject(regions.toString(),BStationRegion.class);

轉list對象集合:

List<BStationRegion> stationRegionList = JSONObject.parseArray(regions.toString(),BStationRegion.class);

參考:https://blog.csdn.net/zhu_nana/article/details/91868249

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM