private JSONObject validateAndToLowerCase(JSONObject jObj) throws CoreTokenException, JSONException {
  if (jObj == null) {
    return null;
  }
  JSONObject retObj=new JSONObject();
  Iterator<String> it=jObj.keys();
  while (it.hasNext()) {
    String key=it.next();
    String lcKey=key.toLowerCase();
    int pos=lcKey.indexOf(CONNECTOR);
    if (pos <= 0) {
      String[] args=new String[]{key};
      throw new CoreTokenException(227,args,400);
    }
    if (!internalTokenAttrs.contains(lcKey) && lcKey.startsWith("token.")) {
      String[] args=new String[]{key};
      throw new CoreTokenException(225,args,400);
    }
 else {
      retObj.put(lcKey,jObj.getJSONArray(key));
    }
  }
  return retObj;
}

private JSONObject validateAndToLowerCase ( JSONObject jObj ) throws CoreTokenException , JSONException { if ( jObj == null ) { return null ; } JSONObject retObj = new JSONObject ( ) ; Iterator < String > it = jObj . keys ( ) ; while ( it . hasNext ( ) ) { String key = it . next ( ) ; String lcKey = key . toLowerCase ( ) ; int pos = lcKey . indexOf ( CONNECTOR ) ; if ( pos <= 0 ) { String [ ] args = new String [ ] { key } ; throw new CoreTokenException ( 227 , args , 400 ) ; } if ( ! internalTokenAttrs . contains ( lcKey ) && lcKey . startsWith ( "token." ) ) { String [ ] args = new String [ ] { key } ; throw new CoreTokenException ( 225 , args , 400 ) ; } else { retObj . put ( lcKey , jObj . getJSONArray ( key ) ) ; } } return retObj ; }
validates token attribute name , it should not start with " token . " . also convert all attribute name to lower case and return .
