类 JsonUtils
java.lang.Object
com.hengyi.xbaseweb.common.utils.JsonUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static BooleanisJsonArray(String text) 判断字符串是否为json数组static BooleanisJsonObject(String text) 判断字符串是否为json对象static <T> Object[]转换为数组static <T> Object[]转换为数组static <T> T转换为对象static <T> T转换为对象static com.alibaba.fastjson2.JSONObjecttoJsonObject(String obj) 转换为JsonObjectstatic <T> List<T>转换为Liststatic String转为字符串
-
构造器详细资料
-
JsonUtils
public JsonUtils()
-
-
方法详细资料
-
toString
转为字符串- 参数:
obj-- 返回:
-
toJsonObject
转换为JsonObject- 参数:
obj-- 返回:
-
toBean
转换为对象- 类型参数:
T-- 参数:
text-clazz-- 返回:
-
toBean
转换为对象- 类型参数:
T-- 参数:
text-type-- 返回:
-
toArray
转换为数组- 类型参数:
T-- 参数:
text-- 返回:
-
toArray
转换为数组- 类型参数:
T-- 参数:
text-clazz-- 返回:
-
toList
转换为List- 类型参数:
T-- 参数:
text-clazz-- 返回:
-
isJsonObject
判断字符串是否为json对象- 参数:
text-- 返回:
-
isJsonArray
判断字符串是否为json数组- 参数:
text-- 返回:
-