Я пытаюсь сделать заказ, используя способ доставки.Я использую API судового движка и пытаюсь делать запросы от Android и запускать его с помощью облачных функций.Мои запросы попадают на их сервер, и я также получаю ответ JSON, который содержит разные идентификаторы операторов.Как перейти от этого ответа JSON
Мой сын ответит следующим образом:
{
"rate_response": {
"rates": [
{
"rate_id": "se-21020690",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 0.47
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "letter",
"delivery_days": 4,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-07T00:00:00Z",
"carrier_delivery_days": "3",
"ship_date": "2018-09-03T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail",
"service_code": "usps_first_class_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-21020691",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 1.00
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "large_envelope_or_flat",
"delivery_days": 4,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-07T00:00:00Z",
"carrier_delivery_days": "3",
"ship_date": "2018-09-03T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail",
"service_code": "usps_first_class_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-21020692",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 2.66
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "package",
"delivery_days": 4,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-07T00:00:00Z",
"carrier_delivery_days": "3",
"ship_date": "2018-09-03T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail",
"service_code": "usps_first_class_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-21020693",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 6.79
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "package",
"delivery_days": 3,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-06T00:00:00Z",
"carrier_delivery_days": "2",
"ship_date": "2018-09-03T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS Priority Mail",
"service_code": "usps_priority_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-21020694",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 12.45
},
Заранее спасибо