Class JsonCodec

    • Method Detail

      • defaultFactory

        protected static com.fasterxml.jackson.core.JsonFactory defaultFactory()
      • clearCaches

        public static void clearCaches()
        The encoder and decoder make use of the information from PropertyEditorManager.findEditor(Class) and Introspector.getBeanInfo(Class, Class).

        You’d expect these methods to provide some caching to speed up requests for the same infomration, but they don’t.

        The results are therefore kept in an internal cache. This cache may, however, become outdated of additional classes are loaded into the VM dynamically. This method can be used to clear the caches if this is required.

      • addAlias

        public abstract JsonCodec addAlias​(Class<?> clazz,
                                           String alias)
        Add an alias for the given class.

        If defined, the alias will be used instead of the class name by the encoder.

        Parameters:
        clazz - the class
        alias - the alias
        Returns:
        the object for easy chaining