JakartaEE Json-B Retrofit2 Converter

FasterXML.com parent pom

License

License

Categories

Categories

Retrofit Net HTTP Clients JSON Data
GroupId

GroupId

io.github.cchacin
ArtifactId

ArtifactId

jsonb-retrofit-converter
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

JakartaEE Json-B Retrofit2 Converter
FasterXML.com parent pom
Project Organization

Project Organization

FasterXML
Source Code Management

Source Code Management

https://github.com/cchacin/jsonb-retrofit-converter

Download jsonb-retrofit-converter

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.cchacin/jsonb-retrofit-converter/ -->
<dependency>
    <groupId>io.github.cchacin</groupId>
    <artifactId>jsonb-retrofit-converter</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.cchacin/jsonb-retrofit-converter/
implementation 'io.github.cchacin:jsonb-retrofit-converter:1.0.2'
// https://jarcasting.com/artifacts/io.github.cchacin/jsonb-retrofit-converter/
implementation ("io.github.cchacin:jsonb-retrofit-converter:1.0.2")
'io.github.cchacin:jsonb-retrofit-converter:jar:1.0.2'
<dependency org="io.github.cchacin" name="jsonb-retrofit-converter" rev="1.0.2">
  <artifact name="jsonb-retrofit-converter" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.cchacin', module='jsonb-retrofit-converter', version='1.0.2')
)
libraryDependencies += "io.github.cchacin" % "jsonb-retrofit-converter" % "1.0.2"
[io.github.cchacin/jsonb-retrofit-converter "1.0.2"]

Dependencies

provided (4)

Group / Artifact Type Version
jakarta.json.bind : jakarta.json.bind-api jar 1.0.2
jakarta.json : jakarta.json-api jar 1.1.6
com.squareup.retrofit2 : retrofit jar 2.9.0
com.squareup.okhttp3 : okhttp jar 3.14.9

test (5)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.7.0
org.junit.jupiter : junit-jupiter-params jar 5.7.0
org.assertj : assertj-core jar 3.17.2
com.squareup.okhttp3 : mockwebserver jar 3.14.9
org.eclipse : yasson jar 1.0.8

Project Modules

There are no modules declared in this project.

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 2020 Carlos Chacin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
io.github.cchacin

FasterXML, LLC

Versions

Version
1.0.2