我在String
变量中有一个JSON对象数组:
String response = target.path("flight").path("lufthansa").request().get(String.class);
如下所示:
[
{
"flightNo": "AA65",
"flightName": "Lufthansa Airlines",
"departingFrom": "Beruit",
"arrivingAt": "Heathrow Airport",
"departureTime": "10-11-2015",
"arrivalTime": "10-11-2015",
"cost": 45000.0
}
]
如何将其解析为List<FlightBean>
?
List<FlightBean> flightInfo = new ArrayList<FlightBean>();