使用JSONArray.fromObject(priceList).toString() 来格式化一个List<Object>,自定义对象的list时
提示警告
2009-11-18 15:42:08 net.sf.json.JSONObject _fromBean
警告: Property 'pricesByLid' has no read method. SKIPPED
2009-11-18 15:42:08 net.sf.json.JSONObject _fromBean
警告: Property 'pricesJosnByLid' has no read method. SKIPPED
2009-11-18 15:42:08 net.sf.json.JSONObject _fromBean
警告: Property 'pricesByLid' has no read method. SKIPPED
不停的警告!!
原因发现:
调用json的类中所有的方法如果命名的时候只要以getXXX就会出现这个不能读。
目前只有的解决办法是:
改命名方式,改成list或其他