java将字符串转换为JSONArray(或任何数组)
我正在尝试将以下值参数解析为JSONArray(或任何其他数组):
"value":"[{\"fileName\":\"Instructions.docx\",\"filePath\":\"http://someserver/api/files/somefilereference1\"},{\"fileName\":\"Sailing plan.docx\",\"filePath\":\"http://someservert/api/files/somefilereference2\"}]"
如您所见,我将“值”作为字符串而不是实际数组获取。我如何解析这个
我尝试将其解析为JSONObject和JSONArray,但没有成功
有什么建议吗
# 1 楼答案
啊-我明白了(觉得自己很笨):