public class FastjsonConverterFactory
extends retrofit2.Converter.Factory
| 限定符和类型 | 方法和说明 |
|---|---|
FastjsonConverterFactory |
config(com.alibaba.fastjson.support.config.FastJsonConfig fastJsonConfig)
Create your own
fastjsonConfig instance |
static FastjsonConverterFactory |
create()
Create an instance for conversion.
|
retrofit2.Converter<?,okhttp3.RequestBody> |
requestBodyConverter(java.lang.reflect.Type type,
java.lang.annotation.Annotation[] parameterAnnotations,
java.lang.annotation.Annotation[] methodAnnotations,
retrofit2.Retrofit retrofit)
Returns a
Converter for converting type to an HTTP
request body, or null if type cannot be handled by this factory. |
retrofit2.Converter<okhttp3.ResponseBody,?> |
responseBodyConverter(java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
retrofit2.Retrofit retrofit)
Returns a
Converter for converting an HTTP response body to
type, or null if type cannot be handled by this factory. |
public FastjsonConverterFactory config(com.alibaba.fastjson.support.config.FastJsonConfig fastJsonConfig)
fastjsonConfig instancefastJsonConfig - public static FastjsonConverterFactory create()
public retrofit2.Converter<okhttp3.ResponseBody,?> responseBodyConverter(java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
retrofit2.Retrofit retrofit)
Converter for converting an HTTP response body to
type, or null if type cannot be handled by this factory.
This is used to create converters for response types such as
SimpleResponse from a Call<SimpleResponse> declaration.responseBodyConverter 在类中 retrofit2.Converter.Factorypublic retrofit2.Converter<?,okhttp3.RequestBody> requestBodyConverter(java.lang.reflect.Type type,
java.lang.annotation.Annotation[] parameterAnnotations,
java.lang.annotation.Annotation[] methodAnnotations,
retrofit2.Retrofit retrofit)
Converter for converting type to an HTTP
request body, or null if type cannot be handled by this factory.
This is used to create converters for types specified by
@Body, @Part, and @PartMap
values.requestBodyConverter 在类中 retrofit2.Converter.FactoryCopyright © 2016 deathdealer. All Rights Reserved.