com.litongjava.tio.utils.json.JsonUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tio-utils Show documentation
Show all versions of tio-utils Show documentation
t-io is a aio framework for java
package com.litongjava.tio.utils.json;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
public class JsonUtils {
public static String toJson(Object object) {
return Json.getJson().toJson(object);
}
public static byte[] toJsonBytes(Object object) {
return Json.getJson().toJsonBytes(object);
}
public static T parse(String body, Class type) {
return Json.getJson().parse(body, type);
}
public static Object parseObject(String jsonString) {
return Json.getJson().parseObject(jsonString);
}
public static Object parseArray(String jsonString) {
return Json.getJson().parseArray(jsonString);
}
public static Map, ?> parseToMap(String json) {
return Json.getJson().parseToMap(json);
}
public static Map parseToMap(String json, Class kType, Class vType) {
return Json.getJson().parseToMap(json, kType, vType);
}
public static List