|
|
@ -1,16 +1,16 @@
|
|
|
|
package com.xxl.job.core.util;
|
|
|
|
package com.xxl.job.core.util;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.codehaus.jackson.JsonGenerationException;
|
|
|
|
import org.codehaus.jackson.JsonGenerationException;
|
|
|
|
import org.codehaus.jackson.JsonParseException;
|
|
|
|
import org.codehaus.jackson.JsonParseException;
|
|
|
|
import org.codehaus.jackson.map.JsonMappingException;
|
|
|
|
import org.codehaus.jackson.map.JsonMappingException;
|
|
|
|
import org.codehaus.jackson.map.ObjectMapper;
|
|
|
|
import org.codehaus.jackson.map.ObjectMapper;
|
|
|
|
import org.codehaus.jackson.type.TypeReference;
|
|
|
|
import org.codehaus.jackson.type.TypeReference;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Jackson util
|
|
|
|
* Jackson util
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -29,7 +29,7 @@ public class JacksonUtil {
|
|
|
|
* bean、array、List、Map --> json
|
|
|
|
* bean、array、List、Map --> json
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param obj
|
|
|
|
* @param obj
|
|
|
|
* @return
|
|
|
|
* @return json string
|
|
|
|
* @throws Exception
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static String writeValueAsString(Object obj) {
|
|
|
|
public static String writeValueAsString(Object obj) {
|
|
|
@ -50,7 +50,7 @@ public class JacksonUtil {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param jsonStr
|
|
|
|
* @param jsonStr
|
|
|
|
* @param clazz
|
|
|
|
* @param clazz
|
|
|
|
* @return
|
|
|
|
* @return obj
|
|
|
|
* @throws Exception
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static <T> T readValue(String jsonStr, Class<T> clazz) {
|
|
|
|
public static <T> T readValue(String jsonStr, Class<T> clazz) {
|
|
|
|