JsonObject JsonArray String互相转化
##包 import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
1.String转JSONObject
String s = new String();
JSONObject js = JSONObject.parseObject(s);
2.JSONObject转String
String s = jsonObject2.getString("//key");
3.String转JSONArray
String s = new String;
JSONArray jsonArray = JSONArray.parseArray(s);
4.遍历JSONArray(转JSONObject)
String s = new String();
JSONArray jsonArray = JSONArray.parseArray(s);
for (int i = 0;i<jsonArray.size();i++){
JSONObject jsonObject1 = jsonArray.getJSONObject(i);
}