merge
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.xwbing.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* 创建时间: 2017/10/11 14:34
|
||||
* 作者: xiangwb
|
||||
* 说明:
|
||||
*/
|
||||
public class JsonConverUtil {
|
||||
public static JSONArray str2JsonArray(String string) {
|
||||
return JSON.parseArray(string);
|
||||
}
|
||||
|
||||
public static JSONArray obj2JsonArray(Object object) {
|
||||
return JSON.parseArray(JSONObject.toJSONString(object));
|
||||
}
|
||||
|
||||
public static JSONObject str2JsonObj(String string) {
|
||||
return JSON.parseObject(string);
|
||||
}
|
||||
|
||||
public static JSONObject obj2JsonObj(Object object) {
|
||||
return JSON.parseObject(JSONObject.toJSONString(object));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user