code: 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;
    }
docs: Check if a given string is a JSON object.
  
  @param s the input string.
  @return true if it is a JSON object, false otherwise.