fastjson数组转String
时间: 2023-11-03 11:05:51 浏览: 103
要将fastjson的数组转换为字符串,可以使用JSONArray的toJSONString()方法。例如,如果有一个JSONArray对象名为tableData,你可以使用以下代码将其转换为字符串:
String tableDataString = tableData.toJSONString();
这样,tableDataString就是tableData数组的字符串表示形式了。
#### 引用[.reference_title]
- *1* *3* [fastjson List 、JSONArray、String 相互转化](https://blog.csdn.net/inflaRunAs/article/details/102795432)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [将fastjson元素转化为String[]](https://blog.csdn.net/weixin_30551963/article/details/95004247)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文