@Test public void prettyPrint_should_indent_application_json() { assertThat(cut.prettyPrint(JSON_RAW, "application/json")).isEqualTo(JSON_INDENTED); }
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) { } } return fileContent; }
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) { } } return fileContent; } }
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) { } } return fileContent; }  }
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) { } } return fileContent; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
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) { } } return fileContent; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }