解决方案 »

  1.   

    使用Jackson把字符串转成Json的数组,你就可以依次拿到里面的属性与值。
      

  2.   

    使用jsonarray
      public static Object[] getJsonToArray(String str) {
               JSONArray jsonArray = JSONArray.fromObject(str);
               return jsonArray.toArray();
       }
      

  3.   

    楼主我想你的意思的这样的:
    String str = "[{\"spname\":\"提梁壶\",\"spnum\":\"1\",\"spprice\":\"612.00\"},{\"spname\":\"竹盒手工绞胎8头茶具\",\"spnum\":\"1\",\"spprice\":\"2142.00\"}]";
    JSONArray arr = JSONArray.fromObject(str);
    Object[] oo = arr.toArray();
    System.out.println(oo.length);
    JSONObject obj = JSONObject.fromObject(oo[0]);
    System.out.println(obj.get("spname"));
    -------------------------------------------------------------------------------------------------------------------------------------
    啥也别说了给分吧