Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有来自 JSON 值的这个字符串:
["1","5","10","15","20"]
我需要从这个字符串中获取一个字符串数组。我怎么做?
您可以像这样使用gson 库:
Gson gson = new Gson(); // create gson instance String[] strArr = gson.fromJson(jsonString, String[].class);