You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
misp/misp-helper/src/main/java/com/olexyn/misp/helper/JsonHelper.java

22 lines
345 B

package com.olexyn.misp.helper;
import org.json.JSONException;
import org.json.JSONObject;
public class JsonHelper {
public static boolean isJson(String string){
try{
new JSONObject(string);
}catch (JSONException | NullPointerException e){
return false;
}
return true;
}
}