Class MappingFastJsonValue
- java.lang.Object
-
- com.alibaba.fastjson.support.spring.MappingFastJsonValue
-
- All Implemented Interfaces:
JSONSerializable
@Deprecated public class MappingFastJsonValue extends Object implements JSONSerializable
Deprecated.A simple holder for the POJO to serialize viaFastJsonHttpMessageConverteralong with further serialization instructions to be passed in to the converter.On the server side this wrapper is added with a
ResponseBodyInterceptorafter content negotiation selects the converter to use but before the write.On the client side, simply wrap the POJO and pass it in to the
RestTemplate.- Since:
- 1.2.20
- Author:
- Jerry.Chen
- See Also:
JSONPObject
-
-
Constructor Summary
Constructors Constructor Description MappingFastJsonValue(Object value)Deprecated.Create a new instance wrapping the given POJO to be serialized.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetJsonpFunction()Deprecated.Return the configured JSONP function name.ObjectgetValue()Deprecated.Return the POJO that needs to be serialized.voidsetJsonpFunction(String functionName)Deprecated.Set the name of the JSONP function name.voidsetValue(Object value)Deprecated.Modify the POJO to serialize.voidwrite(JSONSerializer serializer, Object fieldName, Type fieldType, int features)Deprecated.write to json
-
-
-
Constructor Detail
-
MappingFastJsonValue
public MappingFastJsonValue(Object value)
Deprecated.Create a new instance wrapping the given POJO to be serialized.- Parameters:
value- the Object to be serialized
-
-
Method Detail
-
setValue
public void setValue(Object value)
Deprecated.Modify the POJO to serialize.
-
getValue
public Object getValue()
Deprecated.Return the POJO that needs to be serialized.
-
setJsonpFunction
public void setJsonpFunction(String functionName)
Deprecated.Set the name of the JSONP function name.
-
getJsonpFunction
public String getJsonpFunction()
Deprecated.Return the configured JSONP function name.
-
write
public void write(JSONSerializer serializer, Object fieldName, Type fieldType, int features) throws IOException
Deprecated.Description copied from interface:JSONSerializablewrite to json- Specified by:
writein interfaceJSONSerializable- Parameters:
serializer- json seriliazerfieldName- field namefieldType- field typefeatures- field features- Throws:
IOException
-
-