Class JsonUtil

java.lang.Object
io.gitbub.devlibx.easy.helper.json.JsonUtil

public class JsonUtil extends Object
  • Constructor Details

    • JsonUtil

      public JsonUtil()
    • JsonUtil

      public JsonUtil(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Make custom JsonUtil with provided ObjectMapper
  • Method Details

    • readObject

      public <T> T readObject(String str, Class<T> cls)
      Read a object from string
    • readObject

      public <T> T readObject(String str, com.fasterxml.jackson.databind.JavaType cls)
      Read a object from string
    • readList

      public <T> List<T> readList(String str, Class<T> cls)
      Convert string to List
    • convertAsMap

      public Map<String,Object> convertAsMap(String str)
      Convert string to Map
    • convertAsStringObjectMap

      public StringObjectMap convertAsStringObjectMap(String str)
      Convert string to Map
    • convertAsStringObjectMap

      public StringObjectMap convertAsStringObjectMap(byte[] bytes)
      Convert string to Map