public final class JacksonConverterFactory
extends retrofit2.Converter.Factory
JacksonConverterFactory which supports polymorphism.| Modifier and Type | Method and Description |
|---|---|
static JacksonConverterFactory |
create()
Create an instance using a default
ObjectMapper instance for conversion. |
static JacksonConverterFactory |
create(com.fasterxml.jackson.databind.ObjectMapper mapper)
Create an instance using
mapper 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) |
public static JacksonConverterFactory create()
ObjectMapper instance for conversion.public static JacksonConverterFactory create(com.fasterxml.jackson.databind.ObjectMapper mapper)
mapper for conversion.mapper - a user-provided ObjectMapper to usepublic retrofit2.Converter<okhttp3.ResponseBody,?> responseBodyConverter(Type type, Annotation[] annotations, retrofit2.Retrofit retrofit)
responseBodyConverter in class retrofit2.Converter.Factorypublic retrofit2.Converter<?,okhttp3.RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, retrofit2.Retrofit retrofit)
requestBodyConverter in class retrofit2.Converter.Factory/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/