public static String yamlToJson(File file) throws HyscaleException{
        try {
            if(file==null){
               return null;
            }
            String data = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
            return yamlToJson(data);
        } catch (IOException e) {
            LOGGER.error(e.getMessage());
            HyscaleException ex = new HyscaleException(e, CommonErrorCode.FAILED_TO_READ_FILE,file.getPath());
            throw ex;
        }
    }
Converts the given file to Json.

@param file
@return Json String
@throws HyscaleException if any IO Exception occurs while conversion.
commons/src/main/java/io/hyscale/commons/utils/DataFormatConverter.java