RetroCrawler provides Retrofit converters for deserializing Html using jspoon and jsoup-annotations. Both of them internally uses Jsoup.
A default Jspoon
instance will be created or one can be configured and passed to the
RetroCrawlerJSpoonConverterFactory
to further control the deserialization. For more information on how to use Jspoon annotations refer this.
implementation 'com.github.annypatel.retrocrawler:converter-jspoon:1.0.0-alpha1'
To use RetroCrawler Jspoon converter, just add converter when building your Retrofit instance.
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://api.example.com")
.addConverterFactory(RetroCrawlerJSpoonConverterFactory.create())
.build();
JsoupProcessor
class from jsoup-annotations will be used by RetroCrawlerJSoupAnnotationConverterFactory
for Html deserialization. For more information on how to use jsoup-annotations refer this.
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.annypatel.retrocrawler:converter-jsoup-annotations:1.0.0-alpha1'
}
To use RetroCrawler Jsoup-Annotations converter, just add converter when building your Retrofit instance.
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://api.example.com")
.addConverterFactory(RetroCrawlerJSoupAnnotationConverterFactory.create())
.build();