public class FastJsonJsonSerializer extends AbstractJsonSerializer<com.alibaba.fastjson.JSON>
Constructor and Description |
---|
FastJsonJsonSerializer() |
Modifier and Type | Method and Description |
---|---|
<V> String |
serialize(V object)
将对象序列化为字符串
|
<V> byte[] |
serializeAsBytes(V object)
将对象序列化为字节
|
<V> byte[] |
serializeAsBytes(V object,
Charset charset)
将对象序列化为字节
|
<V> byte[] |
serializeAsBytes(V object,
String charsetName)
将对象序列化为字节
|
serialize, serialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure, configure
public <V> String serialize(V object) throws SerializerException
Serializer
V
- 待序列化对象类型object
- 待序列化对象SerializerException
- 序列化异常public <V> byte[] serializeAsBytes(V object) throws SerializerException
Serializer
V
- 待序列化对象类型object
- 待序列化对象SerializerException
- 序列化异常public <V> byte[] serializeAsBytes(V object, String charsetName) throws SerializerException
Serializer
serializeAsBytes
in interface Serializer
serializeAsBytes
in class AbstractJsonSerializer<com.alibaba.fastjson.JSON>
V
- 待序列化对象类型object
- 待序列化对象charsetName
- 字符集SerializerException
- 序列化异常public <V> byte[] serializeAsBytes(V object, Charset charset) throws SerializerException
Serializer
serializeAsBytes
in interface Serializer
serializeAsBytes
in class AbstractJsonSerializer<com.alibaba.fastjson.JSON>
V
- 待序列化对象类型object
- 待序列化对象charset
- 字符集SerializerException
- 序列化异常Copyright © 2024 buession.com Inc.. All rights reserved.