在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):JakeWharton/retrofit2-kotlinx-serialization-converter开源软件地址(OpenSource Url):https://github.com/JakeWharton/retrofit2-kotlinx-serialization-converter开源编程语言(OpenSource Language):Kotlin 93.7%开源软件介绍(OpenSource Introduction):Kotlin Serialization ConverterA Retrofit 2 UsageAdd a converter factory when building your val contentType = "application/json".toMediaType()
val retrofit = Retrofit.Builder()
.baseUrl("https://example.com/")
.addConverterFactory(Json.asConverterFactory(contentType))
.build() Response body types (e.g., Because Kotlin serialization is so flexible in the types it supports, these converters assume that they can handle all types. If you are mixing this converter with another, you must add this instance last to allow the other converters a chance to see their types. DownloadDownload the latest JAR or grab via Gradle: implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0") or Maven: <dependency>
<groupId>com.jakewharton.retrofit</groupId>
<artifactId>retrofit2-kotlinx-serialization-converter</artifactId>
<version>0.8.0</version>
</dependency> Snapshots of the development version are available in Sonatype's License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论