public class JacksonResources extends Object
ObjectMapper
allowing customization and
reuse across the application.Constructor and Description |
---|
JacksonResources()
Create a default
ObjectMapper that allows any field visibility,
registers modules to handle Discord4J specific mappings and ignores unknown properties. |
JacksonResources(Function<ObjectMapper,ObjectMapper> mapper)
Create a custom
ObjectMapper , based on the defaults given by
JacksonResources() |
JacksonResources(ObjectMapper objectMapper)
Create with a pre-configured
ObjectMapper . |
Modifier and Type | Method and Description |
---|---|
ObjectMapper |
getObjectMapper()
Get the
ObjectMapper configured by this provider. |
public JacksonResources()
ObjectMapper
that allows any field visibility,
registers modules to handle Discord4J specific mappings and ignores unknown properties.public JacksonResources(Function<ObjectMapper,ObjectMapper> mapper)
ObjectMapper
, based on the defaults given by
JacksonResources()
mapper
- a Function to customize the ObjectMapper to be createdpublic JacksonResources(ObjectMapper objectMapper)
ObjectMapper
. Using this will replace the
recommended default and can lead to unexpected behavior and errors.objectMapper
- a pre-configured ObjectMapper to usepublic ObjectMapper getObjectMapper()
ObjectMapper
configured by this provider.