src/main/java/framework/DataDrivenParser.java
/**
     *
     * @param main Json object to check
     * @param dataSetName DataSet Name
     * @param keyName
     * @return
     */
@param main Json object to check
@param dataSetName DataSet Name
@param keyName
@return
@param main Json object to check @param dataSetName DataSet Name @param keyName @return
public String checkDataSetDataTypeWhenItHasJsonObject(JSONObject main, String dataSetName, List<String> keyName) {
        String type=null;
        if(((JSONObject) main.get(dataSetName)).containsKey(excelFileDataSet)){
            type = "excel";
        }
        else {
            JSONObject dataSetList = (JSONObject) main.get(dataSetName);
            isJSONArray = isDataSetListHasJsonArray(dataSetList, keyName);
            if (!isJSONArray) {
                type = checkDataSetDataTypeIsGlobalOrNot(dataSetList, dataSetName, keyName);
            }
        }
       return  type;
    }
public String checkDataSetDataTypeWhenItHasJsonObject ( JSONObject main , String dataSetName , List < String > keyName ) { String type = null ; if ( ( ( JSONObject ) main . get ( dataSetName ) ) . containsKey ( excelFileDataSet ) ) { type = "excel" ; } else { JSONObject dataSetList = ( JSONObject ) main . get ( dataSetName ) ; isJSONArray = isDataSetListHasJsonArray ( dataSetList , keyName ) ; if ( ! isJSONArray ) { type = checkDataSetDataTypeIsGlobalOrNot ( dataSetList , dataSetName , keyName ) ; } } return type ; }
@param main Json object to check
 @param dataSetName DataSet Name
 @param keyName
 @return
@param main Json object to check @param dataSetName DataSet Name @param keyName @return