{
"result": {
"total": "3",
"shops": [
{
"shopId": "8b615ce0",
"shopName": "舒",
"icon":
},
{
"shopId": "f6f83000a",
"shopName": "二号",
"icon":
},
]
},
"code": 0,
"message": "OK",
"text": "OK"
}
JSONObject 对象rt
想要修改“shops” 对应的值怎么修改??
This is an example of fastjson
Results
What json library are you using? Just change it using the corresponding method
I assume you are using
com.googlecode.json-simple
Kuba (the information you provided is really too little, I don’t know where to start)Then, I assume you want to modify
shops
里第一项的shopName
, and the code is written like this:If you want to add something to
shops
, you can:According to the Google json or Alibaba fastjson you use, use the methods they provide to modify it.