docs: private JSONObject map2JSON(JSONObject jo, Map<String, Object> map) {
          for (Entry<String, Object> entry : map.entrySet()) {
              String subkeys = null;
              String key = null;
              Object value = entry.getValue();
              int i = entry.getKey().indexOf(".");
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "raw key, index", new Object[] { entry.getKey(), i });
              }
              if (i > -1) {
                  subkeys = entry.getKey().substring(i + 1);
                  key = entry.getKey().substring(0, i);
              } else {
                  key = entry.getKey();
              }
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "key, subkeys", new Object[] { key, subkeys });
              }
              if (subkeys == null) { // simple key
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "simple key: " + entry.getKey());
                  }
                  if (value == null) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "value is null");
                      }
                      jo.put(key, "null");
                  } else if (value instanceof Map) { // value is a Map
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "value is a Map, calling map2JSON", value);
                      }
                      jo.put(key, map2JSON(new JSONObject(), (Map<String, Object>) value));
                  } else if (value.getClass().isArray()) { // value is an array
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "value is an array, calling array2JSON", value);
                      }
                      jo.put(key, array2JSON(new JSONArray(), (Object[]) value));
                  } else { // else value is a "simple" value
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "simple value, adding to jo", value);
                      }
                      jo.put(key, value);
                  }
              } else { // compound key
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "compound key: " + entry.getKey());
                  }
                  JSONObject jsonSubstruc = (JSONObject) jo.get(key);
                  if (jsonSubstruc == null) {
                      jsonSubstruc = new JSONObject();
                      jo.put(key, jsonSubstruc);
                  }
                  Map<String, Object> submap = new TreeMap<String, Object>();
                  submap.put(subkeys, value);
                  map2JSON(jsonSubstruc, submap);
              }
          }
          return jo;
      }