Class Retrofit2ConverterFactory
- java.lang.Object
-
- retrofit2.Converter.Factory
-
- com.alibaba.fastjson.support.retrofit.Retrofit2ConverterFactory
-
public class Retrofit2ConverterFactory extends retrofit2.Converter.Factory- Author:
- ligboy, wenshao, Victor.Zxy
-
-
Constructor Summary
Constructors Constructor Description Retrofit2ConverterFactory()Retrofit2ConverterFactory(FastJsonConfig fastJsonConfig)
-
Method Summary
-
-
-
Constructor Detail
-
Retrofit2ConverterFactory
public Retrofit2ConverterFactory()
-
Retrofit2ConverterFactory
public Retrofit2ConverterFactory(FastJsonConfig fastJsonConfig)
-
-
Method Detail
-
create
public static Retrofit2ConverterFactory create()
-
create
public static Retrofit2ConverterFactory create(FastJsonConfig fastJsonConfig)
-
responseBodyConverter
public retrofit2.Converter<okhttp3.ResponseBody,Object> responseBodyConverter(Type type, Annotation[] annotations, retrofit2.Retrofit retrofit)
- Overrides:
responseBodyConverterin classretrofit2.Converter.Factory
-
requestBodyConverter
public retrofit2.Converter<Object,okhttp3.RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, retrofit2.Retrofit retrofit)
- Overrides:
requestBodyConverterin classretrofit2.Converter.Factory
-
getFastJsonConfig
public FastJsonConfig getFastJsonConfig()
-
setFastJsonConfig
public Retrofit2ConverterFactory setFastJsonConfig(FastJsonConfig fastJsonConfig)
-
getParserConfig
@Deprecated public ParserConfig getParserConfig()
Deprecated.Gets parser config.- Returns:
- the parser config
- See Also:
FastJsonConfig.getParserConfig()
-
setParserConfig
@Deprecated public Retrofit2ConverterFactory setParserConfig(ParserConfig config)
Deprecated.Sets parser config.- Parameters:
config- the config- Returns:
- the parser config
- See Also:
FastJsonConfig.setParserConfig(ParserConfig)
-
getParserFeatureValues
@Deprecated public int getParserFeatureValues()
Deprecated.Gets parser feature values.- Returns:
- the parser feature values
- See Also:
JSON.DEFAULT_PARSER_FEATURE
-
setParserFeatureValues
@Deprecated public Retrofit2ConverterFactory setParserFeatureValues(int featureValues)
Deprecated.Sets parser feature values.- Parameters:
featureValues- the feature values- Returns:
- the parser feature values
- See Also:
JSON.DEFAULT_PARSER_FEATURE
-
getParserFeatures
@Deprecated public Feature[] getParserFeatures()
Deprecated.Get parser features feature [].- Returns:
- the feature []
- See Also:
FastJsonConfig.getFeatures()
-
setParserFeatures
@Deprecated public Retrofit2ConverterFactory setParserFeatures(Feature[] features)
Deprecated.Sets parser features.- Parameters:
features- the features- Returns:
- the parser features
- See Also:
FastJsonConfig.setFeatures(Feature...)
-
getSerializeConfig
@Deprecated public SerializeConfig getSerializeConfig()
Deprecated.Gets serialize config.- Returns:
- the serialize config
- See Also:
FastJsonConfig.getSerializeConfig()
-
setSerializeConfig
@Deprecated public Retrofit2ConverterFactory setSerializeConfig(SerializeConfig serializeConfig)
Deprecated.Sets serialize config.- Parameters:
serializeConfig- the serialize config- Returns:
- the serialize config
- See Also:
FastJsonConfig.setSerializeConfig(SerializeConfig)
-
getSerializerFeatures
@Deprecated public SerializerFeature[] getSerializerFeatures()
Deprecated.Get serializer features serializer feature [].- Returns:
- the serializer feature []
- See Also:
FastJsonConfig.getSerializerFeatures()
-
setSerializerFeatures
@Deprecated public Retrofit2ConverterFactory setSerializerFeatures(SerializerFeature[] features)
Deprecated.Sets serializer features.- Parameters:
features- the features- Returns:
- the serializer features
- See Also:
FastJsonConfig.setSerializerFeatures(SerializerFeature...)
-
-