This object?
Private List
Private List
Private List
The trouble with the analytical method, tools
CodePudding user response:
Reference under theString STR="{" URL" : [" url1 ", "url2", "url3"], "Title" : [" title1 ", "title2", "title3]"} ";
Try {
JSONObject object=new JSONObject (STR);
JSONArray urlArray=object. GetJSONArray (" URL ");
JSONArray titleArray=object. GetJSONArray (" Title ");
for (int i=0; I & lt; UrlArray. Length (); I++) {
System. The out. Println (titleArray. Get string (I));
}
} the catch (JSONException e) {
e.printStackTrace();
}
CodePudding user response:
public class ResponseBean {
/* *
* success: true
* errorMsg:
* result: {" rShipmentLists ": [{" gasdescatthattime" : "mineral water", "gasidatthattime" : 15, "count" : 1}], "rSendDetails" : [{" affectCompName ":" Jiang Yue company ", "gasidatthattime" : 15, "gasdescatthattime" : "mineral water", "bottleSendCount" : 1, "bottleBackCount" : 1, "bottleSendCountAndDetail" : {" count ": 1," rNumberDetails ": [{" number" : "910000157"})}, "bottleBackCountAndDetail" : {" count ": 1," rNumberDetails ": [{" number" : "910000115"}]}}], "rBackShipmentLists" : [{" gasdescatthattime ":" mineral water ", "gasidatthattime" : 15, "count" : 1}]}
*/
Private Boolean success;
private String errorMsg;
Private ResultBean result;
Public Boolean isSuccess () {
The return success.
}
Public void setSuccess (Boolean success) {
This. Success=success;
}
Public String getErrorMsg () {
Return errorMsg;
}
Public void setErrorMsg (String errorMsg) {
Enclosing errorMsg=errorMsg;
}
Public ResultBean getResult () {
return result;
}
Public void setResult (ResultBean result) {
this.result=result;
}
Public static class ResultBean {
Private ListRShipmentLists;
Private ListRSendDetails;
Private ListRBackShipmentLists;
Public ListGetRShipmentLists () {
Return rShipmentLists;
}
Public void setRShipmentLists (ListRShipmentLists) {
Enclosing rShipmentLists=rShipmentLists;
}
Public ListGetRSendDetails () {
Return rSendDetails;
}
Public void setRSendDetails (ListRSendDetails) {
Enclosing rSendDetails=rSendDetails;
}
Public ListGetRBackShipmentLists () {
Return rBackShipmentLists;
}
Public void setRBackShipmentLists (ListRBackShipmentLists) {
Enclosing rBackShipmentLists=rBackShipmentLists;
}
Public static class RShipmentListsBean {
/* *
* gasdescatthattime: mineral water
15 * gasidatthattime:
* count: 1
*/
Private String gasdescatthattime;
Private int gasidatthattime;
Private int count;
Public String getGasdescatthattime () {
Return gasdescatthattime;
}
Public void setGasdescatthattime (String gasdescatthattime) {
Enclosing gasdescatthattime=gasdescatthattime;
}
Public int getGasidatthattime () {
Return gasidatthattime;
}
Public void setGasidatthattime (int gasidatthattime) {
Enclosing gasidatthattime=gasidatthattime;
}
Public int getCount () {
return count;
}
Public void setCount (int count) {
This. Count=count;
}
}
Public static class RSendDetailsBean {
/* *
* affectCompName: Jiang Yue company15 * gasIdAtThattime:
* gasDescAtThattime: mineral water
* bottleSendCount: 1
* bottleBackCount: 1
* bottleSendCountAndDetail: {" count ": 1," rNumberDetails ": [{" number" : "910000157"}]}
* bottleBackCountAndDetail: {" count ": 1," rNumberDetails ": [{" number" : "910000115"}]}
*/
Private String affectCompName;
Private int gasIdAtThattime;
Private String gasDescAtThattime;
Private int bottleSendCount;
Private int bottleBackCount;
Private BottleSendCountAndDetailBean bottleSendCountAndDetail;
Private BottleBackCountAndDetailBean bottleBackCountAndDetail;
Public String getAffectCompName () {
Return affectCompName;
}
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull