类 JsonUtil
- java.lang.Object
-
- me.hekr.iotos.api.util.JsonUtil
-
public class JsonUtil extends Object
-
-
构造器概要
构造器 构造器 说明 JsonUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <T> Tconvert(Object obj, com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference)static <T> Tconvert(Object obj, Class<T> clazz)static <T> TfromBase64(String payload, com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference)static <T> TfromBase64(String payload, Class<T> tClass)static <T> TfromBytes(byte[] payload, Class<T> tClass)static <T> TfromJson(String payload, com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference)static <T> TfromJson(String payload, Class<T> tClass)static com.fasterxml.jackson.databind.JsonNodeparse(String str)static StringtoBase64(Object obj)static byte[]toBytes(Object obj)static StringtoJson(Object obj)
-
-
-
方法详细资料
-
parse
public static com.fasterxml.jackson.databind.JsonNode parse(String str) throws IOException
- 抛出:
IOException
-
toJson
public static String toJson(Object obj) throws com.fasterxml.jackson.core.JsonProcessingException
- 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-
toBytes
public static byte[] toBytes(Object obj) throws com.fasterxml.jackson.core.JsonProcessingException
- 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-
toBase64
public static String toBase64(Object obj) throws com.fasterxml.jackson.core.JsonProcessingException
- 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-
fromJson
public static <T> T fromJson(String payload, Class<T> tClass) throws IOException
- 抛出:
IOException
-
fromJson
public static <T> T fromJson(String payload, com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference) throws IOException
- 抛出:
IOException
-
fromBase64
public static <T> T fromBase64(String payload, Class<T> tClass) throws IOException
- 抛出:
IOException
-
fromBytes
public static <T> T fromBytes(byte[] payload, Class<T> tClass) throws IOException- 抛出:
IOException
-
fromBase64
public static <T> T fromBase64(String payload, com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference) throws IOException
- 抛出:
IOException
-
convert
public static <T> T convert(Object obj, com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference)
-
-