com.fasterxml.jackson.jr.retrofit2.JacksonJrResponseArrayConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jackson-jr-retrofit2 Show documentation
Show all versions of jackson-jr-retrofit2 Show documentation
Basic provider implementation for Retrofit 2 library
package com.fasterxml.jackson.jr.retrofit2;
import java.io.IOException;
import java.util.List;
import com.fasterxml.jackson.jr.ob.JSON;
import okhttp3.ResponseBody;
import retrofit2.Converter;
public class JacksonJrResponseArrayConverter implements Converter>
{
protected final JSON _jr;
protected final Class _type;
public JacksonJrResponseArrayConverter(JSON jr, Class type) {
_jr = jr;
_type = type;
}
@Override
public List convert(ResponseBody value) throws IOException {
return _jr.listOfFrom(_type, value.bytes());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy