[英]How to remove this double quote before curly braces from this json string
If your JSON string format is the same you can use the following code to get your desired result: 如果您的JSON字符串格式相同,则可以使用以下代码获得所需的结果:
jsonString = jsonString.replaceAll("(\"\\{\")","\\{\"").replaceAll("(\"\\}\")","\"\\}");
It simply removes all the leading and trailing double quotes from every array element. 它只是从每个数组元素中删除所有前导和尾随双引号。
You can convert your string into JSON using the following code: 您可以使用以下代码将字符串转换为JSON:
JSONObject jsonObject= new JSONObject(jsonString);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.