当前位置:网站首页>怎样从微信返回的json字符串中截取某个key的值?
怎样从微信返回的json字符串中截取某个key的值?
2022-07-02 12:05:00 【杀手不太冷!】
怎样从微信返回的json字符串中截取某个key的值?

String result = HttpClientUtil.getMethodApi(uri, mchId, mchSerialNo, apiV3Key, privateKey);
System.out.println("==========>>>>>>微信接口返回数据:"+result);
/** 先把微信官方返回的json字符串解析成一个json对象 */
JSONObject object = JSONObject.parseObject(result);
/** 然后得到这个json对象的data属性的值,因为data属性的值是一个json数组,因此返回值类型是JSONArray */
JSONArray data = object.getJSONArray("data");
边栏推荐
猜你喜欢

16_Redis_Redis持久化

6.12 企业内部upp平台(Unified Process Platform)的关键一刻

06_ Stack and queue conversion

Pytorch 保存tensor到.mat文件

05_ queue

Evaluation of embedded rz/g2l processor core board and development board of Feiling

MySQL calculate n-day retention rate

Download blender on Alibaba cloud image station

I made an istio workshop. This is the first introduction

07_哈希
随机推荐
MD5加密
The past and present lives of visual page building tools
Recommended configuration of tidb software and hardware environment
Engineer evaluation | rk3568 development board hands-on test
03.golang初步使用
Storage read-write speed and network measurement based on rz/g2l | ok-g2ld-c development board
【网络安全】网络资产收集
18_Redis_Redis主从复制&&集群搭建
PHP method to get the index value of the array item with the largest key value in the array
TiDB 集群最小部署的拓扑架构
學習使用php實現公曆農曆轉換的方法代碼
04_ Stack
Evaluation of embedded rz/g2l processor core board and development board of Feiling
12_Redis_Bitmap_命令
TiDB数据迁移工具概览
[c voice] explain the advanced pointer and points for attention (2)
10_ Redis_ geospatial_ command
面对“缺芯”挑战,飞凌如何为客户产能提供稳定强大的保障?
17_Redis_Redis发布订阅
6.12 企业内部upp平台(Unified Process Platform)的关键一刻