9

I am working with Retrofit and GSON. I have a JSON response as a JSON array but I don't know how to parse it by using a model class. My response is as follows:

[
    "One",
    "Two",
    "Three",
    "Four",
    "Five",
    "Six",
    "Seven",
    "Eight"
]
2
  • Is it a simple String array? Commented Feb 20, 2015 at 12:16
  • @DevrimTuncer yes ,but this response from retrofit. Commented Feb 20, 2015 at 12:18

1 Answer 1

29

Just call in the callback a list of Strings and it should do the job...

new Callback<List<String>>().
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.