class PostmanService {

    String prettyPrint(String fileContent, String contentType) {
        if (MediaType.APPLICATION_JSON_VALUE.equals(contentType) || StringUtils.startsWith(contentType, MediaType.APPLICATION_JSON_VALUE + ";")) {
            try {
                Object json = objectMapper.readValue(fileContent, Object.class);
                return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(json);
            } catch (@SuppressWarnings(
                    "squid:S1166") IOException e) { // Exception handlers should preserve the original exceptions
                // Ignore exception because it is a user malformed object, and we gracefully fallback by not indenting it
            }
        }
        return fileContent;
    }

}