Topinambur Gson is a simple Topinambur's exension. The main goal is:
- Adds Json support to the Topinambur's response body
- Add JitPack in your root build.gradle at the end of repositories:
repositories {
...
maven { url 'https://jitpack.io' }
}
- Add the dependency
implementation 'com.github.DaikonWeb:topinambur-gson:1.14.1'
- Add the JitPack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
- Add the dependency
<dependency>
<groupId>com.github.DaikonWeb</groupId>
<artifactId>topinambur-gson</artifactId>
<version>1.14.1</version>
</dependency>
data class TestBody(val message: String)
val response = "https://some.api".http.get()
println(response.json<TestBody>())