|
|
|
package org.jeecg.modules.airag.app.utils;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
public class JsonUtils {
|
|
|
|
public static Map<String, String> jsonUtils(String json) {
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
Map<String, String> metadata;
|
|
|
|
try {
|
|
|
|
metadata = objectMapper.readValue(json, Map.class);
|
|
|
|
} catch (JsonProcessingException e) {
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
}
|
|
|
|
return metadata;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|