0

I have to Parse a JSON Array without key in Android Using Retrofit. There is no key, I'm getting value only.

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

1
  • Please show us what you've tried. The code you wrote Commented Jun 20, 2020 at 17:23

1 Answer 1

2

Your data type is List<Int> or List<Long>

interface HttpService {
    @GET("/path/of/your/api")
    suspend fun getMyValues(): List<Int>
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.