protected String getJSon(Collection<String> rules) {

		rules = rules.stream()
			.map(s -> new JsonPrimitive(s).toString())
			.collect(Collectors.toCollection(LinkedHashSet::new));

		String trustedsources = TemplateEngine.instance()
			.getTemplate(
					ResourceRef.forResource("classpath:/trusted-sources.json.qute"))
			.data("trustedsources", rules)
			.render();
		return trustedsources;
	}
in place reverse of array

@param array array to reverse
@param <T>
@return reversed array
src/main/java/dev/jbang/net/TrustedSources.java