@Test public void givenStringToIsJSONNullReturnsFalse() throws Exception { assertThat(ValidationReportUtils.isJSONValid("random string")).isFalse(); }
public static boolean isJSONValid(String json) { if (json == null) { return false; } try { new JSONObject(json); } catch (JSONException e) { return false; } return true; }
ValidationReportUtils { public static boolean isJSONValid(String json) { if (json == null) { return false; } try { new JSONObject(json); } catch (JSONException e) { return false; } return true; } }
ValidationReportUtils { public static boolean isJSONValid(String json) { if (json == null) { return false; } try { new JSONObject(json); } catch (JSONException e) { return false; } return true; }  }
ValidationReportUtils { public static boolean isJSONValid(String json) { if (json == null) { return false; } try { new JSONObject(json); } catch (JSONException e) { return false; } return true; }  static String getValidateFilename(final String reportJSON); static List<String> getValidationWarnings(final String jsonValidationResult); static String getOverallValidationResult(final String reportJSON); static String handleMissingJSON(); static boolean isJSONValid(String json); }
ValidationReportUtils { public static boolean isJSONValid(String json) { if (json == null) { return false; } try { new JSONObject(json); } catch (JSONException e) { return false; } return true; }  static String getValidateFilename(final String reportJSON); static List<String> getValidationWarnings(final String jsonValidationResult); static String getOverallValidationResult(final String reportJSON); static String handleMissingJSON(); static boolean isJSONValid(String json);  }