static <V> DecodeJson<Map<String, V>> decodeMap(DecodeJson<V> decodeJson) {
        return node -> {
            if (node.isObject()) {
                Map<String, V> result = new HashMap<>();
                Iterator<Map.Entry<String, JsonNode>> elements = node.fields();
                while (elements.hasNext()) {
                    Map.Entry<String, JsonNode> next = elements.next();
                    result.put(next.getKey(), decodeJson.decode(next.getValue()));
                }
                return result;
            }
            throw throwJsonMappingException("JSON object", node);
        };
    }
Decode the JSON node provided into an instance of `T`.

@throws JsonMappingException if `node` cannot be decoded into `T`.
server-common/src/main/java/org/apache/kafka/server/util/json/DecodeJson.java