Reputation: 492
I have this String from a JSON value:
["1","5","10","15","20"]
I need to get a string array from this string. How do I do that?
Upvotes: 2
Views: 292
Reputation: 786146
You can use gson library like this:
Gson gson = new Gson(); // create gson instance
String[] strArr = gson.fromJson(jsonString, String[].class);
Upvotes: 7