public class JacksonSerializer extends java.lang.Object implements Serializer<java.lang.String>
构造器和说明 |
---|
JacksonSerializer() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
deserialize(java.lang.String data,
java.lang.reflect.Type toType)
反序列化
|
static JacksonSerializer |
getInstance() |
com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
java.lang.String |
name()
名字
|
java.lang.String |
serialize(java.lang.Object fromObj)
序列化
|
void |
setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dataType, mimeType
public static JacksonSerializer getInstance()
public com.fasterxml.jackson.databind.ObjectMapper getMapper()
public void setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
public java.lang.String name()
Serializer
name
在接口中 Serializer<java.lang.String>
public java.lang.String serialize(java.lang.Object fromObj) throws java.io.IOException
Serializer
serialize
在接口中 Serializer<java.lang.String>
fromObj
- 来源对象java.io.IOException
public java.lang.Object deserialize(java.lang.String data, java.lang.reflect.Type toType) throws java.io.IOException
Serializer
deserialize
在接口中 Serializer<java.lang.String>
toType
- 目标类型java.io.IOException