JSONObject获取msg
时间: 2024-03-22 11:20:07 浏览: 61
要获取JSONObject中的"msg"值,可以使用以下代码:
String msg = obj.getString("msg");
其中,obj是一个JSONObject对象,"msg"是要获取的键名。这样就可以获取到对应的"value"值了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [java小工具util系列8:JSONObject获取key](https://blog.csdn.net/a924382407/article/details/121957607)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [layui表格 返回的数据状态异常的解决方法](https://download.csdn.net/download/weixin_38631225/13666218)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文