public void addErrorMessage(String message, String... args) {
        if (StringUtils.isEmpty(message)) {
            return;
        }
        if (args != null && args.length > 0) {
            errorMessages.add(String.format(message.replaceAll("\\{\\}", "%s"), args));
        } else {
            errorMessages.add(message);
        }
    }
Class to handle output acivity in structured format like JSON/YAML.
commons/src/main/java/io/hyscale/commons/io/StructuredOutputHandler.java