public static boolean isJsonObject ( final String s ) { if ( s == null || s . isEmpty ( ) ) { return false ; } if ( s . startsWith ( "{" ) || s . startsWith ( "[" ) || "true" . equals ( s ) || "false" . equals ( s ) || "null" . equals ( s ) || decimalPattern . matcher ( s ) . matches ( ) ) { return true ; } return false ; }
Check if a given string is a JSON object .