Deepak Awashti

Deepak Awashti

  • NA
  • 301
  • 73.7k

How to get json data in sub object save in datatable usg c#

Jul 26 2016 12:00 PM
How to get json data in sub object save in datatable using c#
 
 
JSON Data convert to DataTable using asp.net C# code ....

JSON DATA :--

{
"PricedItineraries": [{
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AA"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "N",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": "32B"
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 171,
"OnTimePerformance": {
"Level": 9
},
"OperatingAirline": {
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AA"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 334,
"ResBookDesigCode": "N",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": "32B"
},
"DepartureDateTime": "2016-07-30T14:30:00",
"ArrivalDateTime": "2016-07-30T23:04:00",
"FlightNumber": 32,
"OnTimePerformance": {
"Level": 8
},
"OperatingAirline": {
"FlightNumber": 32,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 334
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AA"
}
},
"SequenceNumber": 1,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "N",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "NA00ZNJ1"
}, {
"BookingCode": "N",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "NA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "N"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "N"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 329,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T09:00:00",
"ArrivalDateTime": "2016-07-30T17:29:00",
"FlightNumber": 1645,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 2,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 329
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 6,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 337,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T17:00:00",
"ArrivalDateTime": "2016-07-31T01:37:00",
"FlightNumber": 1837,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 180,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 337
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 10,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 335,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T15:30:00",
"ArrivalDateTime": "2016-07-31T00:05:00",
"FlightNumber": 1779,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 22,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 335
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 8,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 336,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T08:00:00",
"ArrivalDateTime": "2016-07-30T16:36:00",
"FlightNumber": 1029,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 82,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 336
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 2,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 334,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T06:00:00",
"ArrivalDateTime": "2016-07-30T14:34:00",
"FlightNumber": 1041,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 292,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 334
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 4,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 338,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T21:15:00",
"ArrivalDateTime": "2016-07-31T05:53:00",
"FlightNumber": 1749,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 10,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 338
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 7,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AA"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "N",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": "32B"
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 171,
"OnTimePerformance": {
"Level": 9
},
"OperatingAirline": {
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AA"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 336,
"ResBookDesigCode": "N",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": "32B"
},
"DepartureDateTime": "2016-07-30T08:00:00",
"ArrivalDateTime": "2016-07-30T16:36:00",
"FlightNumber": 82,
"OnTimePerformance": {
"Level": 8
},
"OperatingAirline": {
"FlightNumber": 82,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 336
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AA"
}
},
"SequenceNumber": 3,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "N",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "NA00ZNJ1"
}, {
"BookingCode": "N",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "NA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "N"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "N"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 337,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T22:45:00",
"ArrivalDateTime": "2016-07-31T07:22:00",
"FlightNumber": 1219,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 28,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 337
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 5,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}, {
"AirItinerary": {
"OriginDestinationOptions": {
"OriginDestinationOption": [{
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "JFK"
},
"ArrivalAirport": {
"LocationCode": "LAX"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -7
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 366,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-27T06:00:00",
"ArrivalDateTime": "2016-07-27T09:06:00",
"FlightNumber": 1015,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 171,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -4
}
}],
"ElapsedTime": 366
}, {
"FlightSegment": [{
"DepartureAirport": {
"LocationCode": "LAX"
},
"ArrivalAirport": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "AS"
},
"ArrivalTimeZone": {
"GMTOffset": -4
},
"TPA_Extensions": {
"eTicket": {
"Ind": true
}
},
"StopQuantity": 0,
"ElapsedTime": 334,
"ResBookDesigCode": "Q",
"MarriageGrp": "O",
"Equipment": {
"AirEquipType": 321
},
"DepartureDateTime": "2016-07-30T14:30:00",
"ArrivalDateTime": "2016-07-30T23:04:00",
"FlightNumber": 1794,
"OperatingAirline": {
"CompanyShortName": "AMERICAN AIRLINES",
"FlightNumber": 32,
"Code": "AA"
},
"DepartureTimeZone": {
"GMTOffset": -7
}
}],
"ElapsedTime": 334
}]
},
"DirectionInd": "Return"
},
"TPA_Extensions": {
"ValidatingCarrier": {
"Code": "AS"
}
},
"SequenceNumber": 9,
"AirItineraryPricingInfo": {
"PTC_FareBreakdowns": {
"PTC_FareBreakdown": {
"FareBasisCodes": {
"FareBasisCode": [{
"BookingCode": "Q",
"DepartureAirportCode": "JFK",
"AvailabilityBreak": true,
"ArrivalAirportCode": "LAX",
"content": "QA00ZNJ1"
}, {
"BookingCode": "Q",
"DepartureAirportCode": "LAX",
"AvailabilityBreak": true,
"ArrivalAirportCode": "JFK",
"content": "QA00ZNJ1"
}]
},
"PassengerTypeQuantity": {
"Quantity": 1,
"Code": "ADT"
},
"PassengerFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"Amount": "458.20"
},
"Taxes": {
"TotalTax": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "58.20"
},
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "US1",
"Amount": "30.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "ZP",
"Amount": "8.00"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "AY",
"Amount": "11.20"
}, {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "XF",
"Amount": "9.00"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
}
},
"FareInfos": {
"FareInfo": [{
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}, {
"TPA_Extensions": {
"Cabin": {
"Cabin": "Y"
},
"SeatsRemaining": {
"BelowMin": false,
"Number": 7
}
},
"FareReference": "Q"
}]
},
"TPA_Extensions": {
"DivideInParty": {
"Indicator": false
}
},
"ItinTotalFare": {
"FareConstruction": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"TotalFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "458.20"
},
"Taxes": {
"Tax": [{
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"TaxCode": "TOTALTAX",
"Amount": "58.20"
}]
},
"BaseFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
},
"EquivFare": {
"CurrencyCode": "USD",
"DecimalPlaces": 2,
"Amount": "400.00"
}
}
},
"TicketingInfo": {
"TicketType": "eTicket"
}
}],
"ReturnDateTime": "2016-07-30",
"DepartureDateTime": "2016-07-27",
"DestinationLocation": "LAX",
"OriginLocation": "JFK",
"Links": [{
"rel": "self",
"href": "https://api.test.sabre.com/v1/shop/flights?origin=JFK&destination=LAX&departuredate=2016-07-27&returndate=2016-07-30&onlineitinerariesonly=N&limit=10&offset=1&eticketsonly=N&sortby=totalfare&order=asc&sortby2=departuretime&order2=asc&pointofsalecountry=US"
}, {
"rel": "linkTemplate",
"href": "https://api.test.sabre.com/v1/shop/flights?origin=&destination=&departuredate=&returndate=&offset=&limit=&sortby=&order=&sortby2=&order2=&minfare=&maxfare=&includedcarriers=&excludedcarriers=&outboundflightstops=&inboundflightstops=&outboundstopduration=&inboundstopduration=&outbounddeparturewindow=&outboundarrivalwindow=&inbounddeparturewindow=&inboundarrivalwindow=&onlineitinerariesonly=&eticketsonly=&includedconnectpoints=&excludedconnectpoints=&pointofsalecountry=&passengercount="
}]
}

What I have tried:

public DataTable JsonStringToDataTable(string data)
{
DataTable dt = new DataTable();
string[] jsonStringArray = Regex.Split(data.Replace("{", "").Replace("}", ""), "},{");
List ColumnsName = new List();
foreach (string jSA in jsonStringArray)
{
string[] jsonStringData = Regex.Split(jSA.Replace("[", "").Replace("]", ""), ",");
foreach (string ColumnsNameData in jsonStringData)
{
try
{
int idx = ColumnsNameData.IndexOf(":");
string ColumnsNameString = ColumnsNameData.Substring(0, idx - 1).Replace("\"", "");
if (!ColumnsName.Contains(ColumnsNameString))
{
ColumnsName.Add(ColumnsNameString);
}
}
catch (Exception ex)
{
throw new Exception(string.Format("Error Parsing Column Name : {0}", ColumnsNameData));
}
}
break;
}
foreach (string AddColumnName in ColumnsName)
{
dt.Columns.Add(AddColumnName);
}
foreach (string jSA in jsonStringArray)
{
string[] RowData = Regex.Split(jSA.Replace("{", "").Replace("}", ""), ",");
DataRow nr = dt.NewRow();
foreach (string rowData in RowData)
{
try
{
int idx = rowData.IndexOf(":");
string RowColumns = rowData.Substring(0, idx - 1).Replace("\"", "");
string RowDataString = rowData.Substring(idx + 1).Replace("\"", "");
nr[RowColumns] = RowDataString;
}
catch (Exception ex)
{
continue;
}
}
dt.Rows.Add(nr);
}
return dt;
}

}
 

Answers (1)