public class GsonConverterFactory
extends retrofit2.Converter.Factory
| 限定符和类型 | 类和说明 |
|---|---|
static class |
GsonConverterFactory.DateToStringConverter |
| 限定符和类型 | 字段和说明 |
|---|---|
private GsonConverterFactory.DateToStringConverter |
dateToStringConverter |
private com.google.gson.Gson |
gson |
| 限定符 | 构造器和说明 |
|---|---|
private |
GsonConverterFactory(com.google.gson.Gson gson,
String json_date_format) |
| 限定符和类型 | 方法和说明 |
|---|---|
static GsonConverterFactory |
create()
Create an instance using a default
Gson instance for conversion. |
static GsonConverterFactory |
create(com.google.gson.Gson gson,
String json_date_format)
Create an instance using
gson for conversion. |
retrofit2.Converter<?,okhttp3.RequestBody> |
requestBodyConverter(Type type,
Annotation[] parameterAnnotations,
Annotation[] methodAnnotations,
retrofit2.Retrofit retrofit) |
retrofit2.Converter<okhttp3.ResponseBody,?> |
responseBodyConverter(Type type,
Annotation[] annotations,
retrofit2.Retrofit retrofit) |
retrofit2.Converter<?,String> |
stringConverter(Type type,
Annotation[] annotations,
retrofit2.Retrofit retrofit) |
private final com.google.gson.Gson gson
private final GsonConverterFactory.DateToStringConverter dateToStringConverter
private GsonConverterFactory(com.google.gson.Gson gson,
String json_date_format)
public static GsonConverterFactory create()
Gson instance for conversion. Encoding to JSON and
decoding from JSON (when no charset is specified by a header) will use UTF-8.public static GsonConverterFactory create(com.google.gson.Gson gson, String json_date_format)
gson for conversion. Encoding to JSON and
decoding from JSON (when no charset is specified by a header) will use UTF-8.public retrofit2.Converter<okhttp3.ResponseBody,?> responseBodyConverter(Type type, Annotation[] annotations, retrofit2.Retrofit retrofit)
responseBodyConverter 在类中 retrofit2.Converter.Factorypublic retrofit2.Converter<?,okhttp3.RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, retrofit2.Retrofit retrofit)
requestBodyConverter 在类中 retrofit2.Converter.Factorypublic retrofit2.Converter<?,String> stringConverter(Type type, Annotation[] annotations, retrofit2.Retrofit retrofit)
stringConverter 在类中 retrofit2.Converter.FactoryCopyright © 2022. All rights reserved.