JacksonAdapter Class
- java.
lang. Object - com.
microsoft. bot. restclient. serializer. JacksonAdapter
- com.
Implements
public class JacksonAdapter
implements SerializerAdapter<com.fasterxml.jackson.databind.ObjectMapper>
A serialization helper class wrapped around JacksonConverterFactory and ObjectMapper.
Constructor Summary
| Constructor | Description |
|---|---|
| JacksonAdapter() |
Creates a new Jackson |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| T | <T>deserialize(String value, Type type) |
| com.microsoft.bot.restclient.serializer.JacksonConverterFactory | converterFactory() |
| java.lang.String |
serialize(Object object)
Serializes an object into a JSON string. |
| java.lang.String |
serializeList(List<?> list, CollectionFormat format)
Serializes a list into a string with the delimiter specified with the Swagger collection format joining each individual serialized items in the list. |
| java.lang.String |
serializeRaw(Object object)
Serializes an object into a raw string. |
| com.fasterxml.jackson.databind.ObjectMapper | serializer() |
| protected com.fasterxml.jackson.databind.ObjectMapper |
simpleMapper()
Gets a static instance of ObjectMapper that doesn't handle flattening. |
Methods inherited from java.lang.Object
Constructor Details
JacksonAdapter
public JacksonAdapter()
Creates a new JacksonAdapter instance with default mapper settings.
Method Details
<T>deserialize
public T
Parameters:
Throws:
converterFactory
public JacksonConverterFactory converterFactory()
serialize
public String serialize(Object object)
Serializes an object into a JSON string.
Parameters:
Throws:
serializeList
public String serializeList(List list, CollectionFormat format)
Serializes a list into a string with the delimiter specified with the Swagger collection format joining each individual serialized items in the list.
Parameters:
serializeRaw
public String serializeRaw(Object object)
Serializes an object into a raw string. The leading and trailing quotes will be trimmed.
Parameters:
serializer
public ObjectMapper serializer()
simpleMapper
protected ObjectMapper simpleMapper()
Gets a static instance of ObjectMapper that doesn't handle flattening.
Returns: