Interface JsonLibrary

    • Method Detail

      • read

        <T> T read​(io.netty.buffer.ByteBuf content,
                   java.lang.reflect.Type valueType)
        Read a JSON value from the given content.
        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

        io.netty.buffer.ByteBuf write​(io.netty.buffer.ByteBufAllocator alloc,
                                      java.lang.Object value)
        Write a JSON value into the a ByteBuf.
        Parameters:
        alloc - the ByteBufAllocator allocates ByteBufs
        value - the value object
        Returns:
        a ByteBuf