private static Map<String, String> flatten(Map<String, String> out, Map<? extends Object, ? extends Object> in, String prefix) {
        for (Map.Entry<? extends Object, ? extends Object> e : in.entrySet()) {
            if (e.getValue() instanceof Map) {
                flatten(out, (Map<? extends Object, ? extends Object>) e.getValue(), prefix + e.getKey() + ".");
            } else {
                out.put(prefix + e.getKey(), String.valueOf(e.getValue()).replace('&', '\u00a7'));
            }
        }
        return out;
    }