Class SupportJson.Jackson2JsonLibrary
- java.lang.Object
-
- com.github.fmjsjx.libnetty.http.server.middleware.SupportJson.Jackson2JsonLibrary
-
- All Implemented Interfaces:
SupportJson.JsonLibrary
- Enclosing class:
- SupportJson
@Deprecated public static class SupportJson.Jackson2JsonLibrary extends java.lang.Object implements SupportJson.JsonLibrary
Deprecated.please useJackson2JsonLibraryinsteadImplementation ofSupportJson.JsonLibraryusingjackson2.
-
-
Field Summary
-
Fields inherited from interface com.github.fmjsjx.libnetty.http.server.middleware.SupportJson.JsonLibrary
KEY
-
-
Constructor Summary
Constructors Constructor Description Jackson2JsonLibrary()Deprecated.Constructs a newSupportJson.Jackson2JsonLibrarywith the defaultObjectMapper.Jackson2JsonLibrary(com.fasterxml.jackson.databind.ObjectMapper objectMapper)Deprecated.Constructs a newSupportJson.Jackson2JsonLibrarywith the specifiedObjectMapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> Tread(io.netty.buffer.ByteBuf content, java.lang.reflect.Type valueType)Deprecated.Read a JSON value from the given content.io.netty.buffer.ByteBufwrite(io.netty.buffer.ByteBufAllocator alloc, java.lang.Object value)Deprecated.Write a JSON value into the aByteBuf.
-
-
-
Constructor Detail
-
Jackson2JsonLibrary
public Jackson2JsonLibrary(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Deprecated.Constructs a newSupportJson.Jackson2JsonLibrarywith the specifiedObjectMapper.- Parameters:
objectMapper- anObjectMapper
-
Jackson2JsonLibrary
public Jackson2JsonLibrary()
Deprecated.Constructs a newSupportJson.Jackson2JsonLibrarywith the defaultObjectMapper.
-
-
Method Detail
-
read
public <T> T read(io.netty.buffer.ByteBuf content, java.lang.reflect.Type valueType)Deprecated.Description copied from interface:SupportJson.JsonLibraryRead a JSON value from the given content.- Specified by:
readin interfaceSupportJson.JsonLibrary- Type Parameters:
T- the type of the value to be converted to- Parameters:
content- aByteBufvalueType- 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)Deprecated.Description copied from interface:SupportJson.JsonLibraryWrite a JSON value into the aByteBuf.- Specified by:
writein interfaceSupportJson.JsonLibrary- Parameters:
alloc- theByteBufAllocatorallocatesByteBufsvalue- the value object- Returns:
- a
ByteBuf
-
-