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.
|
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;
|
|
}
|
|
}
|