In [] array JSON beginning of the string: str = "[{ " name ":" San " , " age ":" 28 " }] " // wherein str string format the JSONArray JSONArray = JSONArray.fromObject (str ); // if {} is the beginning of the string str = "{ " name ":" San " , " age ":" 28 " } " // wherein str string format the jSONObject jsonObject = JSONObject.fromObject ( str);
Which it should be noted in a string garbled when a Chinese can not be converted.