Class Jackson


  • public class Jackson
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T fromJsonString​(java.lang.String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper, java.lang.Class<T> clazz)  
      static <T> T fromJsonString​(java.lang.String json, java.lang.Class<T> clazz)
      Returns the deserialized object from the given json string and target class; or null if the given json string is null.
      static com.fasterxml.jackson.databind.JsonNode jsonNodeOf​(java.lang.String json)  
      static java.lang.String toJsonString​(java.lang.Object value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toJsonString

        public static java.lang.String toJsonString​(java.lang.Object value)
      • fromJsonString

        public static <T> T fromJsonString​(java.lang.String json,
                                           java.lang.Class<T> clazz)
        Returns the deserialized object from the given json string and target class; or null if the given json string is null.
        Type Parameters:
        T - the expected object type
        Parameters:
        json - the string to be deserialized
        clazz - the expected object class
        Returns:
        an object that is deserialized from the json string
      • fromJsonString

        public static <T> T fromJsonString​(java.lang.String json,
                                           com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                           java.lang.Class<T> clazz)
      • jsonNodeOf

        public static com.fasterxml.jackson.databind.JsonNode jsonNodeOf​(java.lang.String json)