|
|
@ -27,10 +27,7 @@ import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.*; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.TimeZone; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* json utils |
|
|
|
* json utils |
|
|
@ -109,7 +106,7 @@ public class JSONUtils { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static <T> List<T> toList(String json, Class<T> clazz) { |
|
|
|
public static <T> List<T> toList(String json, Class<T> clazz) { |
|
|
|
if (StringUtils.isEmpty(json)) { |
|
|
|
if (StringUtils.isEmpty(json)) { |
|
|
|
return null; |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
return JSONArray.parseArray(json, clazz); |
|
|
|
return JSONArray.parseArray(json, clazz); |
|
|
@ -117,7 +114,7 @@ public class JSONUtils { |
|
|
|
logger.error("JSONArray.parseArray exception!",e); |
|
|
|
logger.error("JSONArray.parseArray exception!",e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|