程序包 gateway.api

类 GsonConverterFactory

java.lang.Object
retrofit2.Converter.Factory
gateway.api.GsonConverterFactory

public class GsonConverterFactory extends retrofit2.Converter.Factory
JSON应答转换工厂
作者:
neeker
  • 字段详细资料

  • 构造器详细资料

    • GsonConverterFactory

      private GsonConverterFactory(com.google.gson.Gson gson, String json_date_format)
  • 方法详细资料

    • create

      public static GsonConverterFactory create()
      Create an instance using a default Gson instance for conversion. Encoding to JSON and decoding from JSON (when no charset is specified by a header) will use UTF-8.
    • create

      public static GsonConverterFactory create(com.google.gson.Gson gson, String json_date_format)
      Create an instance using gson for conversion. Encoding to JSON and decoding from JSON (when no charset is specified by a header) will use UTF-8.
    • responseBodyConverter

      public retrofit2.Converter<okhttp3.ResponseBody,?> responseBodyConverter(Type type, Annotation[] annotations, retrofit2.Retrofit retrofit)
      覆盖:
      responseBodyConverter 在类中 retrofit2.Converter.Factory
    • requestBodyConverter

      public retrofit2.Converter<?,okhttp3.RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, retrofit2.Retrofit retrofit)
      覆盖:
      requestBodyConverter 在类中 retrofit2.Converter.Factory
    • stringConverter

      public retrofit2.Converter<?,String> stringConverter(Type type, Annotation[] annotations, retrofit2.Retrofit retrofit)
      覆盖:
      stringConverter 在类中 retrofit2.Converter.Factory