Class JsonUtils


  • public class JsonUtils
    extends Object
    • Method Detail

      • serializer

        public static JsonUtils serializer()
      • mapper

        public com.fasterxml.jackson.databind.ObjectMapper mapper()
      • writer

        public com.fasterxml.jackson.databind.ObjectWriter writer()
      • prettyWriter

        public com.fasterxml.jackson.databind.ObjectWriter prettyWriter()
      • fromJson

        public <T> T fromJson​(byte[] bytes,
                              com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
      • fromJson

        public <T> T fromJson​(String json,
                              com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
      • fromObject

        public <T> T fromObject​(Object obj,
                                com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
      • toPrettyString

        public String toPrettyString​(Object obj)
      • toByteArray

        public byte[] toByteArray​(Object obj)