Class DefaultJSONMapper

  • All Implemented Interfaces:
    JSONMapper, WidgetJSONMapper

    public class DefaultJSONMapper
    extends java.lang.Object
    implements WidgetJSONMapper
    Default JSON <> Java object mapper, which iterates through all mapper configurations till it finds proper ObjectMapper and uses it.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.fasterxml.jackson.databind.ObjectMapper configureMapper​(java.lang.Class<?> objectType, com.fasterxml.jackson.databind.ObjectMapper mapper)  
      protected com.fasterxml.jackson.databind.ObjectMapper createMapper​(java.lang.Class<?> objectType)  
      <T> T fromJSONString​(WidgetInstanceManager widgetInstanceManager, java.lang.String json, java.lang.Class<T> resultType)  
      <T> T fromJSONString​(java.lang.String json, java.lang.Class<T> resultType)  
      java.util.List<ObjectMapperConfiguration> getConfigurations()  
      protected com.fasterxml.jackson.databind.ObjectMapper getMapper​(WidgetInstanceManager widgetInstanceManager, java.lang.Class<?> objectType)  
      protected com.fasterxml.jackson.databind.ObjectMapper getMapper​(java.lang.Class<?> objectType)  
      protected <T> T readValue​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, java.lang.String json, java.lang.Class<T> resultType)  
      void setConfigurations​(java.util.List<ObjectMapperConfiguration> configurations)  
      java.lang.String toJSONString​(WidgetInstanceManager widgetInstanceManager, java.lang.Object object)  
      java.lang.String toJSONString​(java.lang.Object object)  
      protected java.lang.String writeValue​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, java.lang.Object object)  
      • Methods inherited from class java.lang.Object

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

      • DefaultJSONMapper

        public DefaultJSONMapper()
    • Method Detail

      • writeValue

        protected java.lang.String writeValue​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                              java.lang.Object object)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • readValue

        protected <T> T readValue​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                  java.lang.String json,
                                  java.lang.Class<T> resultType)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • fromJSONString

        public <T> T fromJSONString​(java.lang.String json,
                                    java.lang.Class<T> resultType)
        Specified by:
        fromJSONString in interface JSONMapper
      • toJSONString

        public java.lang.String toJSONString​(java.lang.Object object)
        Specified by:
        toJSONString in interface JSONMapper
      • createMapper

        protected com.fasterxml.jackson.databind.ObjectMapper createMapper​(java.lang.Class<?> objectType)
      • configureMapper

        protected com.fasterxml.jackson.databind.ObjectMapper configureMapper​(java.lang.Class<?> objectType,
                                                                              com.fasterxml.jackson.databind.ObjectMapper mapper)
      • getMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getMapper​(WidgetInstanceManager widgetInstanceManager,
                                                                        java.lang.Class<?> objectType)
      • getMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getMapper​(java.lang.Class<?> objectType)