class ValidateTor {

  public boolean isJSON(String str) {
    try {
      // check against JSONObject
      new JSONObject(str);
    } catch (JSONException ex) {
      // check against JSONArray
      try {
        new JSONArray(str);
      } catch (JSONException ex1) {
        return false;
      }
      return true;
    }
    return true;
  }

  public  ValidateTor();

}