Class SwaggerJsonSerializer
- java.lang.Object
-
- com.alibaba.fastjson.support.springfox.SwaggerJsonSerializer
-
- All Implemented Interfaces:
ObjectSerializer
public class SwaggerJsonSerializer extends Object implements ObjectSerializer
Swagger的Json处理,解决/v2/api-docs获取不到内容导致获取不到API页面内容的问题- Since:
- 1.2.15
- Author:
- zhaiyongchao [http://blog.didispace.com]
-
-
Field Summary
Fields Modifier and Type Field Description static SwaggerJsonSerializerinstance
-
Constructor Summary
Constructors Constructor Description SwaggerJsonSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features)fastjson invokes this call-back method during serialization when it encounters a field of the specified type.
-
-
-
Field Detail
-
instance
public static final SwaggerJsonSerializer instance
-
-
Method Detail
-
write
public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException
Description copied from interface:ObjectSerializerfastjson invokes this call-back method during serialization when it encounters a field of the specified type.- Specified by:
writein interfaceObjectSerializerobject- src the object that needs to be converted to Json.fieldName- parent object field namefieldType- parent object field typefeatures- parent object field serializer features- Throws:
IOException
-
-