将如下数据转为list<对象>
建立json字符串里字段对应的实体FundNetWorthTrendVO,需要转换的json数据netWorthTrend格式如下:
[{"x":1393948800000,"y":1.0,"dsg":0,"hhv":""},{"x":1393948800000,"y":1.0,"dsg":0,"hhv":""},{"x":1393948800000,"y":1.0,"dsg":0,"hhv":""},{"x":1393948800000,"y":1.0,"dsg":0,"hhv":""}]处理代码如下:
List<FundNetWorthTrendVO> jsonList = JSONArray.parseArray(netWorthTrend, FundNetWorthTrendVO.class);版权声明:本文为qq_30776829原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。