toMap

public static Map<K, V> toMap<K, V>(JsonNode jsonNode, Function<String, K> keyMapper, Function<JsonNode, V> valueMapper)(source)

Converts a JsonNode to a Map of Ks and Vs by applying the given keyMapper to each key and the valueMapper to each value of the json node.

Return

the converted map.

Parameters

jsonNode

the json node to convert.

keyMapper

the mapper that is applied to each key of the json node.

valueMapper

the mapper that is applied to each value of the json node.

<K>

the type of the keys of the map.

<V>

the type of the values of the map.