gpt4 book ai didi

android - 使用 Kotlin 作为 Android 和 iOS 的 RestAPI 解析器

转载 作者:行者123 更新时间:2023-11-29 05:23:52 27 4
gpt4 key购买 nike


我目前正在编写一个 Android 和 iOS 应用程序,该应用程序很大程度上基于与 RestAPI 服务器的通信。
我的目标是只写一次通信、解析等。我听说过 Kotlin 共享库,但还无法让它工作。
在浪费更多时间尝试让它发挥作用之前,这是正确的方法吗?您还向我建议什么其他方法?
谢谢

最佳答案

您正在寻找的可能是 Kotlin MultiPlatform Projects。查看https://ktor.io ,它允许您只编写一次网络代码。还结账https://github.com/Kotlin/kotlinx.serialization用于 JSON 序列化。

关于android - 使用 Kotlin 作为 Android 和 iOS 的 RestAPI 解析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58378805/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com