Java tutorial
//package com.java2s; import org.json.JSONArray; import org.json.JSONException; public class Main { public static JSONArray stringToJSONArray(String str) throws Exception { try { return new JSONArray(str); } catch (JSONException e) { throw new RuntimeException(e.getMessage() + ":" + str, e); } } }