多個對象在此刻,我可以正確地分析JSON是這樣的:解析與GSON
"assignments:[{"
+ "'id': '111',"
+ "'erporder_erpid' : '132',"
+ "'dtStart' : '10:00 12-12-12',"
+ "}]";
與GSON。但我不知道解析多個對象的適當方式,如:
"assignments:[{"
+ "'id': '111',"
+ "'erporder_erpid' : '132',"
+ "'dtStart' : '10:00 12-12-12',"
+ "},"
+ "{"
+ "'id': '111',"
+ "'erporder_erpid' : '132',"
+ "'dtStart' : '10:00 12-12-12',"
+ "}]"
我有一個正確設置的Javabean。
謝謝你的回答!但是它絕對拒絕從對象類中獲取Assignments。 getAssignments無法解析,因爲它在Objectclass中被明確聲明,所以很奇怪。 – MaikelS 2011-12-29 12:20:30
清理項目,並在公共 – 2011-12-29 12:25:35
還追加「{」「}」在您的JSON字符串額外的括號 – 2011-12-29 12:26:13