@Test public void remove_comments() { assertTrue(JSON.equals("{\n" + " \"a\": {\n" + " \"b\": 1\n" + " },\n" + " \"list\": [\n" + " {\n" + " \"c\": 2\n" + " },\n" + " {\n" + " }\n" + " ]\n" + "}", SystemFlagsDataArchive.normalizeJson("{\n" + " \"comment\": \"comment a\",\n" + " \"a\": {\n" + " \"comment\": \"comment b\",\n" + " \"b\": 1\n" + " },\n" + " \"list\": [\n" + " {\n" + " \"comment\": \"comment c\",\n" + " \"c\": 2\n" + " },\n" + " {\n" + " \"comment\": \"comment d\"\n" + " }\n" + " ]\n" + "}"))); }
static String normalizeJson(String json) { JsonNode root = uncheck(() -> mapper.readTree(json)); removeCommentsRecursively(root); verifyValues(root); return root.toString(); }
SystemFlagsDataArchive { static String normalizeJson(String json) { JsonNode root = uncheck(() -> mapper.readTree(json)); removeCommentsRecursively(root); verifyValues(root); return root.toString(); } }
SystemFlagsDataArchive { static String normalizeJson(String json) { JsonNode root = uncheck(() -> mapper.readTree(json)); removeCommentsRecursively(root); verifyValues(root); return root.toString(); } private  SystemFlagsDataArchive(Map<FlagId, Map<String, FlagData>> files); }
SystemFlagsDataArchive { static String normalizeJson(String json) { JsonNode root = uncheck(() -> mapper.readTree(json)); removeCommentsRecursively(root); verifyValues(root); return root.toString(); } private  SystemFlagsDataArchive(Map<FlagId, Map<String, FlagData>> files); static SystemFlagsDataArchive fromZip(InputStream rawIn); static SystemFlagsDataArchive fromDirectory(Path directory); void toZip(OutputStream out); Set<FlagData> flagData(FlagsTarget target); void validateAllFilesAreForTargets(SystemName currentSystem, Set<FlagsTarget> targets); }
SystemFlagsDataArchive { static String normalizeJson(String json) { JsonNode root = uncheck(() -> mapper.readTree(json)); removeCommentsRecursively(root); verifyValues(root); return root.toString(); } private  SystemFlagsDataArchive(Map<FlagId, Map<String, FlagData>> files); static SystemFlagsDataArchive fromZip(InputStream rawIn); static SystemFlagsDataArchive fromDirectory(Path directory); void toZip(OutputStream out); Set<FlagData> flagData(FlagsTarget target); void validateAllFilesAreForTargets(SystemName currentSystem, Set<FlagsTarget> targets);  }