I have a json data that I need to be parse in java
The data is in the form
["string1","string2","string3",...]
Any idea how I can do that?
I have a json data that I need to be parse in java
The data is in the form
["string1","string2","string3",...]
Any idea how I can do that?
You can use GSON api and use the code as below
Type type = new TypeToken<Collection<String>>(){}.getType();
List<String> results = new Gson().fromJson(json, type);
It depends a bit on how complete you want toe JSON parsing to be. If the above example is representative of all you expect, you might as well do some good old string parsing with indexOf and split.
If you want more complete JSON parsing, I'd suggest looking at the official json.org site and their Java page