繁体   English   中英

使用 Retrofit 在 Android 中解析 JSON 数组

[英]Parse JSON Array without key in Android Using Retrofit

我必须使用 Retrofit 解析 JSON 数组,而无需在 Android 中键入密钥。 没有钥匙,我只得到价值。

[ 55、10、105、30、5、6、12、100]

您的数据类型是List<Int>List<Long>

interface HttpService {
    @GET("/path/of/your/api")
    suspend fun getMyValues(): List<Int>
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM