private static Set<String> parseBots(String json){
  Set<String> result=new HashSet<>();
  if (json == null) {
    return result;
  }
  JSONParser parser=new JSONParser();
  try {
    JSONObject root=(JSONObject)parser.parse(json);
    JSONArray botsArray=(JSONArray)root.get("bots");
    if (botsArray == null) {
      return result;
    }
    for (    Object o : botsArray) {
      result.add((String)o);
    }
  }
 catch (  ParseException|ClassCastException ex) {
    LOGGER.warning("BTTV: Error parsing bots: " + ex);
  }
  return result;
}

private static Set < String > parseBots ( String json ) { Set < String > result = new HashSet < > ( ) ; if ( json == null ) { return result ; } JSONParser parser = new JSONParser ( ) ; try { JSONObject root = ( JSONObject ) parser . parse ( json ) ; JSONArray botsArray = ( JSONArray ) root . get ( "bots" ) ; if ( botsArray == null ) { return result ; } for ( Object o : botsArray ) { result . add ( ( String ) o ) ; } } catch ( ParseException | ClassCastException ex ) { LOGGER . warning ( "BTTV: Error parsing bots: " + ex ) ; } return result ; }
parse list of bots from the given json .
