private static void addMap(Element param, Document doc, MethodTuple getterTuple,
                               Map<String, String> object) {
        for (Map.Entry<String, String> e : new TreeMap<String, String>(object).entrySet()) {
            Element element = doc.createElement("string");
            element.setAttribute("key", e.getKey());
            element.setAttribute("value", e.getValue());
            param.appendChild(element);
        }

    }
@param config  config to serialize
@param mode    serialization mode
@param writer  writer
@param charset charset
@throws Exception
tika-core/src/main/java/org/apache/tika/config/TikaConfigSerializer.java