在php中进行JSON解析以显示服务器响应军刀

时间:2016-06-03 22:10:12

标签: php json sabre

从php中进行saber身份验证并对某个航班进行查询后,响应是一个我无法破译的JSON字符串,有人帮助我,因为我可以在php中为我的项目显示这个可读字符串。

部分代码,感谢您的帮助

    object(SharedContext)#3 (1) {
  ["results":"SharedContext":private]=>
  array(7) {
    ["SECURITY"]=>``
    NULL
    ["origin"]=>
    string(3) "MTR"
    ["destination"]=>
    string(3) "BOG"
    ["departureDate"]=>
    string(10) "2016-06-10"
    ["LeadPriceCalendar"]=>
    object(stdClass)#6 (5) {
      ["status"]=>
      string(8) "Complete"
      ["type"]=>
      string(11) "Application"
      ["errorCode"]=>
      string(20) "WARN.RAF.APPLICATION"
      ["timeStamp"]=>
      string(25) "2016-06-03T22:04:40+00:00"
      ["message"]=>
      string(21) "No results were found"
    }
    ["InstaFlight"]=>
    NULL
    ["BargainFinderMax"]=>
    object(stdClass)#4 (2) {
      ["OTA_AirLowFareSearchRS"]=>
      object(stdClass)#10 (11) {
        ["PricedItinCount"]=>
        int(6)
        ["BrandedOneWayItinCount"]=>
        int(0)
        ["SimpleOneWayItinCount"]=>
        int(0)
        ["DepartedItinCount"]=>
        int(0)
        ["SoldOutItinCount"]=>
        int(0)
        ["AvailableItinCount"]=>
        int(0)
        ["Version"]=>
        string(5) "1.8.6"
        ["Success"]=>
        object(stdClass)#11 (0) {
        }
        ["Warnings"]=>
        object(stdClass)#12 (1) {
          ["Warning"]=>
          array(4) {
            [0]=>
            object(stdClass)#13 (5) {
              ["Type"]=>
              string(12) "WORKERTHREAD"
              ["ShortText"]=>
              string(19) "1750772809123328107"
              ["Code"]=>
              string(13) "TRANSACTIONID"
              ["MessageClass"]=>
              string(1) "I"
              ["content"]=>
              string(0) ""
            }
            [1]=>
            object(stdClass)#14 (5) {
              ["Type"]=>
              string(6) "SERVER"
              ["ShortText"]=>
              string(5) "27037"
              ["Code"]=>
              string(9) "TTFHLC702"
              ["MessageClass"]=>
              string(1) "I"
              ["content"]=>
              string(0) ""
            }
            [2]=>
            object(stdClass)#15 (5) {
              ["Type"]=>
              string(7) "DEFAULT"
              ["ShortText"]=>
              string(5) "13330"
              ["Code"]=>
              string(6) "RULEID"
              ["MessageClass"]=>
              string(1) "I"
              ["content"]=>
              string(0) ""
            }
            [3]=>
            object(stdClass)#16 (5) {
              ["Type"]=>
              string(3) "DRE"
              ["ShortText"]=>
              string(5) "13291"
              ["Code"]=>
              string(6) "RULEID"
              ["MessageClass"]=>
              string(1) "I"
              ["content"]=>
              string(0) ""
            }
          }
        }
        ["PricedItineraries"]=>
        object(stdClass)#17 (1) {
          ["PricedItinerary"]=>
          array(6) {
            [0]=>
            object(stdClass)#18 (5) {
              ["SequenceNumber"]=>
              int(1)
              ["AirItinerary"]=>
              object(stdClass)#19 (2) {
                ["DirectionInd"]=>
                string(6) "OneWay"
                ["OriginDestinationOptions"]=>
                object(stdClass)#20 (1) {
                  ["OriginDestinationOption"]=>
                  array(1) {
                    [0]=>
                    object(stdClass)#21 (2) {
                      ["ElapsedTime"]=>
                      int(76)
                      ["FlightSegment"]=>
                      array(1) {
                        [0]=>
                        object(stdClass)#22 (15) {
                          ["DepartureDateTime"]=>
                          string(19) "2016-06-10T08:38:00"
                          ["ArrivalDateTime"]=>
                          string(19) "2016-06-10T09:54:00"
                          ["StopQuantity"]=>
                          int(0)
                          ["FlightNumber"]=>
                          string(4) "3193"
                          ["ResBookDesigCode"]=>
                          string(1) "Q"
                          ["ElapsedTime"]=>
                          int(76)
                          ["DepartureAirport"]=>
                          object(stdClass)#23 (2) {
                            ["LocationCode"]=>
                            string(3) "MTR"
                            ["content"]=>
                            string(0) ""
                          }
                          ["ArrivalAirport"]=>
                          object(stdClass)#24 (3) {
                            ["LocationCode"]=>
                            string(3) "BOG"
                            ["TerminalID"]=>
                            string(1) "1"
                            ["content"]=>
                            string(0) ""
                          }
                          ["OperatingAirline"]=>
                          object(stdClass)#25 (4) {
                            ["CompanyShortName"]=>
                            string(26) "LAN COLOMBIA AIRLINES S.A."
                            ["Code"]=>
                            string(2) "LA"
                            ["FlightNumber"]=>
                            string(4) "3193"
                            ["content"]=>
                            string(0) ""
                          }
                          ["Equipment"]=>
                          array(1) {
                            [0]=>
                            object(stdClass)#26 (2) {
                              ["AirEquipType"]=>
                              string(3) "320"
                              ["content"]=>
                              string(0) ""
                            }
                          }
                          ["MarketingAirline"]=>
                          object(stdClass)#27 (2) {
                            ["Code"]=>
                            string(2) "LA"
                            ["content"]=>
                            string(0) ""
                          }
                          ["MarriageGrp"]=>
                          string(1) "O"
                          ["DepartureTimeZone"]=>
                          object(stdClass)#28 (1) {
                            ["GMTOffset"]=>
                            float(-5)
                          }
                          ["ArrivalTimeZone"]=>
                          object(stdClass)#29 (1) {
                            ["GMTOffset"]=>
                            float(-5)
                          }
                          ["TPA_Extensions"]=>
                          object(stdClass)#30 (1) {
                            ["eTicket"]=>
                            object(stdClass)#31 (1) {
                              ["Ind"]=>
                              bool(true)
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }

0 个答案:

没有答案