类 JsonUtil


  • public class JsonUtil
    extends Object
    • 构造器详细资料

      • JsonUtil

        public JsonUtil()
    • 方法详细资料

      • 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,
                                     com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference)
                              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,
                                    Class<T> clazz)
      • convert

        public static <T> T convert​(Object obj,
                                    com.fasterxml.jackson.core.type.TypeReference<T> tTypeReference)