Class JSONAPIDocumentResponseBodyConverter<T>
- java.lang.Object
-
- com.github.jasminb.jsonapi.retrofit.JSONAPIDocumentResponseBodyConverter<T>
-
- All Implemented Interfaces:
retrofit2.Converter<okhttp3.ResponseBody,JSONAPIDocument<T>>
public class JSONAPIDocumentResponseBodyConverter<T> extends Object implements retrofit2.Converter<okhttp3.ResponseBody,JSONAPIDocument<T>>
JSON API response body converter.- Author:
- jbegic
-
-
Constructor Summary
Constructors Constructor Description JSONAPIDocumentResponseBodyConverter(ResourceConverter parser, Class<?> clazz, boolean isCollection)Creates new JSONAPIDocumentResponseBodyConverter.
-
-
-
Constructor Detail
-
JSONAPIDocumentResponseBodyConverter
public JSONAPIDocumentResponseBodyConverter(ResourceConverter parser, Class<?> clazz, boolean isCollection)
Creates new JSONAPIDocumentResponseBodyConverter.- Parameters:
parser-ResourceConverterparser instanceclazz-Classclass to be handledisCollection-Booleanflag that denotes if processed resource is a single object or collection
-
-
Method Detail
-
convert
public JSONAPIDocument<T> convert(okhttp3.ResponseBody responseBody) throws IOException
- Specified by:
convertin interfaceretrofit2.Converter<okhttp3.ResponseBody,JSONAPIDocument<T>>- Throws:
IOException
-
-