【发布时间】:2016-02-09 07:38:52
【问题描述】:
String dummyStr="[{\"Emp_Id\":\"1254\",\"Emp_Name\":\"abcd\"},{\"Emp_Id\":\"1234\",\"Emp_Name\":\"efgh\"}]";
System.out.println("The JSON string is"+dummyStr);
给出以下输出:
JSON 字符串为 [{"Emp_Id":"1254","Emp_Name":"abcd"},{"Emp_Id":"1234","Emp_Name":"efgh"}]
****但是当我尝试放入一个数组列表时,它显示为****
tmpJsonArrayList.put(dummyStr)
System.out.println("The JSON string List is"+tmpJsonArrayList);
JSON 字符串列表为["[{\"Emp_Id\":\"1254\",\"Emp_Name\":\"abcd\"},{\"Emp_Id\":\"1234\", \"Emp_Name\":\"efgh\"}]"]
【问题讨论】:
-
您能否详细说明您想要实现的目标?另外一点代码可能会有所帮助。 tmpJsonArrayList 是一个什么样的列表?