将JSON对象数组解析为Java bean列表

时间:2015-11-13 18:24:28

标签: java json list

我在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>();

0 个答案:

没有答案