code: protected static JsonObject mapToJson(Map<String, String> map) {
          JsonObject root = new JsonObject();
          for (Entry<String, String> entry : map.entrySet()) {
              String[] split = StringUtils.split(entry.getKey(), '.');
              ArrayDeque<String> dq = new ArrayDeque<>(Arrays.asList(split));
              createOrDescend(root, dq, entry.getValue());
          }
          return root;
      }
docs: Umm :-)