java解析多层json数据

时间:2025-03-19 18:06:40
//这是restoken的值 { "EasyDarwin": { "Header": { "CSeq": "1", "Version": "v1", "MessageType": "MSG_SC_SERVER_GET_CHANNELS_CONFIG_ACK", "ErrorNum": "200", "ErrorString": "Success OK" }, "Body": { "ChannelCount": 200, "Channels": [ { "Audio": 0, "Cdn": "", "CdnEnable": 0, "Channel": 1, "Enable": 1, "IP": "", "Name": "chinnel1", "OnDemand": 0, "Onvif": "", "Password": "", "Port": 0, "Protocol": "RTSP", "Record": 0, "Reserve1": "0", "Reserve2": "", "Reserve3": "0", "Reserve4": "0", "Reserve5": "", "Rtsp": "rtsp://dss/monitor/param?cameraid=1000113%247&substream=2", "Rtsprecord": "", "Transport": "TCP", "UserName": "" }, { "Audio": 0, "Cdn": "", "CdnEnable": 0, "Channel": 2, "Enable": 1, "IP": "", "Name": "chinnel2", "OnDemand": 0, "Onvif": "", "Password": "", "Port": 0, "Protocol": "RTSP", "Record": 0, "Reserve1": "0", "Reserve2": "", "Reserve3": "0", "Reserve4": "0", "Reserve5": "", "Rtsp": "rtsp://dss/monitor/param?cameraid=1000113%246&substream=1", "Rtsprecord": "", "Transport": "TCP", "UserName": "" }, { "Audio": 0, "Cdn": "", "CdnEnable": 0, "Channel": 3, "Enable": 1, "IP": "", "Name": "chinnel3", "OnDemand": 0, "Onvif": "", "Password": "", "Port": 0, "Protocol": "RTSP", "Record": 0, "Reserve1": "0", "Reserve2": "", "Reserve3": "0", "Reserve4": "0", "Reserve5": "", "Rtsp": "rtsp:///dss/monitor/param?cameraid=1000113%2410&substream=2", "Rtsprecord": "", "Transport": "UDP", "UserName": "" }, { "Audio": 0, "Cdn": "", "CdnEnable": 0, "Channel": 4, "Enable": 1, "IP": "", "Name": "chinnel4", "OnDemand": 0, "Onvif": "", "Password": "ubnt13572468", "Port": 0, "Protocol": "RTSP", "Record": 0, "Reserve1": "0", "Reserve2": "", "Reserve3": "0", "Reserve4": "0", "Reserve5": "", "Rtsp": "rtsp://admin:ubnt13572468@02/Streaming/Channels/2?transportmode=unicast", "Rtsprecord": "", "Transport": "TCP", "UserName": "" }, { "Audio": 0, "Cdn": "", "CdnEnable": 0, "Channel": 5, "Enable": 0, "IP": "36.110.6.226", "Name": "chinnel5", "OnDemand": 1, "Onvif": "", "Password": "12345", "Port": 11272, "Protocol": "RTSP", "Record": 0, "Reserve1": "0", "Reserve2": "", "Reserve3": "0", "Reserve4": "0", "Reserve5": "", "Rtsp": "rtsp://admin:12341272/h264/ch1/main/av_stream", "Rtsprecord": "", "Transport": "TCP", "UserName": "" }, { "Audio": 0, "Cdn": "", "CdnEnable": 0, "Channel": 6, "Enable": 1, "IP": "", "Name": "chinnel6", "OnDemand": 0, "Onvif": "", "Password": "", "Port": 0, "Protocol": "RTSP", "Record": 0, "Reserve1": "0", "Reserve2": "", "Reserve3": "0", "Reserve4": "0", "Reserve5": "", "Rtsp": "rtsp://290/dss/monitor/param?cameraid=1000113%245&substream=2", "Rtsprecord": "", "Transport": "UDP", "UserName": "" }, ] } } }