- /**
- * Deserialize the given json string to a map
- *
- * @param json
- * @param keyTypeClass
- * @param valueTypeClass
- * @return
- * @throws IOException
- */
- public static <K, V> Map<K, V> toMap(String json, Class<K> keyTypeClass, Class<V> valueTypeClass)
- throws IOException {
- ObjectMapper mapper = getOneObjectMapper();
- JavaType mapStringObjectType = mapper.getTypeFactory().constructParametricType(HashMap.class, keyTypeClass,
- valueTypeClass);
- return mapper.readValue(json, mapStringObjectType);
- }
+ /**
+ * Deserialize the given json string to a map
+ *
+ * @param json
+ * @param keyTypeClass
+ * @param valueTypeClass
+ * @return
+ * @throws IOException
+ */
+ public static <K, V> Map<K, V> toMap(String json, Class<K> keyTypeClass, Class<V> valueTypeClass) throws IOException {
+ ObjectMapper mapper = getOneObjectMapper();
+ JavaType mapStringObjectType = mapper.getTypeFactory().constructParametricType(HashMap.class, keyTypeClass, valueTypeClass);
+ return mapper.readValue(json, mapStringObjectType);
+ }