JakartaEE Json-B Retrofit2 Converter
A Retrofit 2 Converter.Factory
for JakartaEE Json-B.
Usage
Add a converter factory when building your Retrofit
instance using the
create
method:
var retrofit = new Retrofit.Builder()
.baseUrl("https://example.com/")
.addConverterFactory(JsonbConverterFactory.create())
.build();
Alternatively, you can pass an instance of javax.json.bind.Jsonb
:
var jsonb = JsonbBuilder.create(/* configure your jsonb instance here */ );
var retrofit = new Retrofit.Builder()
.baseUrl("https://example.com/")
.addConverterFactory(JsonbConverterFactory.create(jsonb))
.build();
Download
Download the latest JAR or grab via Gradle:
implementation 'io.github.cchacin:jsonb-retrofit-converter:1.0.2'
or Maven:
<dependency>
<groupId>io.github.cchacin</groupId>
<artifactId>jsonb-retrofit-converter</artifactId>
<version>1.0.2</version>
</dependency>
Snapshots of the development version are available in Sonatype's snapshots
repository.
License
Copyright
β¦