@Test public void parseFilters() { val objectMapper = new ObjectMapper(); val fruits = new String[]{"apple", "banana", "cherry", "tomato"}; val result = ObjectMapperUtil.writeValueAsString(objectMapper, fruits); assertEquals("[ \"apple\", \"banana\", \"cherry\", \"tomato\" ]", result); }
public static List<DetectionFilter> parseFilters(DetectorDocument document) { final ObjectMapper objectMapper = new ObjectMapper(); Object filters = document.getConfig().get("filters"); return (filters == null) ? Collections.emptyList() : Arrays.asList(objectMapper.convertValue(filters, DetectionFilter[].class)); }
DetectorDocumentParserUtil { public static List<DetectionFilter> parseFilters(DetectorDocument document) { final ObjectMapper objectMapper = new ObjectMapper(); Object filters = document.getConfig().get("filters"); return (filters == null) ? Collections.emptyList() : Arrays.asList(objectMapper.convertValue(filters, DetectionFilter[].class)); } }
DetectorDocumentParserUtil { public static List<DetectionFilter> parseFilters(DetectorDocument document) { final ObjectMapper objectMapper = new ObjectMapper(); Object filters = document.getConfig().get("filters"); return (filters == null) ? Collections.emptyList() : Arrays.asList(objectMapper.convertValue(filters, DetectionFilter[].class)); }  }
DetectorDocumentParserUtil { public static List<DetectionFilter> parseFilters(DetectorDocument document) { final ObjectMapper objectMapper = new ObjectMapper(); Object filters = document.getConfig().get("filters"); return (filters == null) ? Collections.emptyList() : Arrays.asList(objectMapper.convertValue(filters, DetectionFilter[].class)); }  static List<DetectionFilter> parseFilters(DetectorDocument document); }
DetectorDocumentParserUtil { public static List<DetectionFilter> parseFilters(DetectorDocument document) { final ObjectMapper objectMapper = new ObjectMapper(); Object filters = document.getConfig().get("filters"); return (filters == null) ? Collections.emptyList() : Arrays.asList(objectMapper.convertValue(filters, DetectionFilter[].class)); }  static List<DetectionFilter> parseFilters(DetectorDocument document);  }