Class Jackson2JsonLibrary

    • Constructor Detail

      • Jackson2JsonLibrary

        public Jackson2JsonLibrary​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Constructs a new Jackson2JsonLibrary with the specified ObjectMapper.
        Parameters:
        objectMapper - an ObjectMapper
      • Jackson2JsonLibrary

        public Jackson2JsonLibrary()
        Constructs a new Jackson2JsonLibrary with the default ObjectMapper.
    • Method Detail

      • defaultObjectMapper

        public static final com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper()
      • jdk8ModuleEnabled

        public static final boolean jdk8ModuleEnabled()
      • jdk8Module

        public static final com.fasterxml.jackson.databind.Module jdk8Module()
      • javaTimeModuleEnabled

        public static final boolean javaTimeModuleEnabled()
      • javaTimeModule

        public static final com.fasterxml.jackson.databind.Module javaTimeModule()
      • read

        public <T> T read​(io.netty.buffer.ByteBuf content,
                          java.lang.reflect.Type valueType)
        Description copied from interface: JsonLibrary
        Read a JSON value from the given content.
        Specified by:
        read in interface JsonLibrary
        Type Parameters:
        T - the type of the value to be converted to
        Parameters:
        content - a ByteBuf
        valueType - the common type of the value
        Returns:
        the converted object
      • write

        public io.netty.buffer.ByteBuf write​(io.netty.buffer.ByteBufAllocator alloc,
                                             java.lang.Object value)
        Description copied from interface: JsonLibrary
        Write a JSON value into the a ByteBuf.
        Specified by:
        write in interface JsonLibrary
        Parameters:
        alloc - the ByteBufAllocator allocates ByteBufs
        value - the value object
        Returns:
        a ByteBuf