5 #include <boost/property_tree/ptree.hpp>
6 #include <boost/property_tree/json_parser.hpp>
8 #include <boost/foreach.hpp>
12 namespace bpt = boost::property_tree;
23 std::istringstream iStr (iBomTree);
31 _airlineCode = pt.get<stdair::AirlineCode_T> (
"flight_date.airline_code");
40 pt.get<stdair::FlightNumber_T> (
"flight_date.flight_number", 100);
42 const std::string& lDepartureDateStr =
43 pt.get<std::string> (
"flight_date.departure_date");
44 _departureDate = boost::gregorian::from_simple_string (lDepartureDateStr);
61 std::ostringstream oStr;
73 const std::string& lDepartureDateStr =
75 pt.put (
"flight_date.departure_date", lDepartureDateStr);
84 bpt::ptree lAirportCodeArray;
86 lAirportCodeArray.push_back (std::pair<bpt::ptree::key_type,
87 bpt::ptree::data_type> (
"", name));
89 pt.put_child (
"flight_date.airport_codes", lAirportCodeArray);
93 write_json (oStr, pt);