1 Reply Latest reply on Apr 27, 2012 4:14 AM by Flash275

    How to Serialize valueObject, created by Adobe flex Builder and filled on s:CallResponder

    Flash275

      My variable Tickets:ArrayCollection containes web-service result, which created s:CallResponder

      and this line

      var S:String=JSON.stringify(Tickets);

      produce error

      Error: Unknown Property: 'dispatchResetEvent'.

          at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()[E:\dev\4.y\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:870]

          at JSON$/stringifySpecializedToString()

          at JSON$/stringify()

          at xxxxxxxxxxxxxx.mxml]

        • 1. Re: How to Serialize valueObject, created by Adobe flex Builder and filled on s:CallResponder
          Flash275 Level 1

          I am use http://code.google.com/p/flame/ and intermediate class (wrapper around valueObjects).

          I reseive this JSON result:

           

          { "filterFunction" : null,

            "length" : 3,

            "list" : { "length" : 3,

                "source" : [ { "DirectTicket" : "b2ce0e6c-8ca1-4dff-a658-be046127bca9",

                      "DirectTicketInfo" : { "AirTransfer" : "Нет",

                          "AirTransferComment" : "-",

                          "AviaCompany" : null,

                          "AviaCompanyCode" : "YM",

                          "CrDate" : "13.03.2012",

                          "FlyClass" : "Economy",

                          "FlyNumber" : "612",

                          "FlyTime" : "14:20",

                          "FromAirport" : "TIV",

                          "FromCity" : "Тиват",

                          "FromCountry" : "Черногория",

                          "FromDate" : "15.06.2012",

                          "FromTime" : "09:20",

                          "HowMany" : "Есть",

                          "ID" : "b2ce0e6c-8ca1-4dff-a658-be046127bca9",

                          "Price" : 282.14999999999998,

                          "ReturnID" : null,

                          "Special" : 0,

                          "ToAirport" : "DMD",

                          "ToCity" : "Москва",

                          "ToCountry" : "Россия",

                          "i" : 18107

                        },

                      "ReturnTicket" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                      "ReturnTicketInfo" : { "AirTransfer" : "Нет",

                          "AirTransferComment" : "-",

                          "AviaCompany" : null,

                          "AviaCompanyCode" : "YM",

                          "CrDate" : "13.03.2012",

                          "FlyClass" : "Economy",

                          "FlyNumber" : "613",

                          "FlyTime" : "16:55",

                          "FromAirport" : "DMD",

                          "FromCity" : "Москва",

                          "FromCountry" : "Россия",

                          "FromDate" : "16.06.2012",

                          "FromTime" : "14:55",

                          "HowMany" : "Есть",

                          "ID" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                          "Price" : 282.14999999999998,

                          "ReturnID" : null,

                          "Special" : 0,

                          "ToAirport" : "TIV",

                          "ToCity" : "Тиват",

                          "ToCountry" : "Черногория",

                          "i" : 17762

                        },

                      "TicketType" : {  },

                      "USDCurs" : 30.15531

                    },

                    { "DirectTicket" : "925ca5a3-41d4-4600-bed0-66819b65f653",

                      "DirectTicketInfo" : { "AirTransfer" : "Нет",

                          "AirTransferComment" : "-",

                          "AviaCompany" : null,

                          "AviaCompanyCode" : "YM",

                          "CrDate" : "13.03.2012",

                          "FlyClass" : "Economy",

                          "FlyNumber" : "614",

                          "FlyTime" : "01:10",

                          "FromAirport" : "TIV",

                          "FromCity" : "Тиват",

                          "FromCountry" : "Черногория",

                          "FromDate" : "15.06.2012",

                          "FromTime" : "20:10",

                          "HowMany" : "Есть",

                          "ID" : "925ca5a3-41d4-4600-bed0-66819b65f653",

                          "Price" : 282.14999999999998,

                          "ReturnID" : null,

                          "Special" : 0,

                          "ToAirport" : "DMD",

                          "ToCity" : "Москва",

                          "ToCountry" : "Россия",

                          "i" : 18106

                        },

                      "ReturnTicket" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                      "ReturnTicketInfo" : { "AirTransfer" : "Нет",

                          "AirTransferComment" : "-",

                          "AviaCompany" : null,

                          "AviaCompanyCode" : "YM",

                          "CrDate" : "13.03.2012",

                          "FlyClass" : "Economy",

                          "FlyNumber" : "613",

                          "FlyTime" : "16:55",

                          "FromAirport" : "DMD",

                          "FromCity" : "Москва",

                          "FromCountry" : "Россия",

                          "FromDate" : "16.06.2012",

                          "FromTime" : "14:55",

                          "HowMany" : "Есть",

                          "ID" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                          "Price" : 282.14999999999998,

                          "ReturnID" : null,

                          "Special" : 0,

                          "ToAirport" : "TIV",

                          "ToCity" : "Тиват",

                          "ToCountry" : "Черногория",

                          "i" : 17762

                        },

                      "TicketType" : {  },

                      "USDCurs" : 30.15531

                    },

                    { "DirectTicket" : "c0ae6276-1085-422c-87e5-f1b4c17b8e72",

                      "DirectTicketInfo" : { "AirTransfer" : "Нет",

                          "AirTransferComment" : "-",

                          "AviaCompany" : null,

                          "AviaCompanyCode" : "YC",

                          "CrDate" : "13.03.2012",

                          "FlyClass" : "Economy",

                          "FlyNumber" : "445",

                          "FlyTime" : "15:00",

                          "FromAirport" : "TIV",

                          "FromCity" : "Тиват",

                          "FromCountry" : "Черногория",

                          "FromDate" : "15.06.2012",

                          "FromTime" : "10:00",

                          "HowMany" : "Есть",

                          "ID" : "c0ae6276-1085-422c-87e5-f1b4c17b8e72",

                          "Price" : 256.5,

                          "ReturnID" : null,

                          "Special" : 0,

                          "ToAirport" : "DMD",

                          "ToCity" : "Москва",

                          "ToCountry" : "Россия",

                          "i" : 18104

                        },

                      "ReturnTicket" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                      "ReturnTicketInfo" : { "AirTransfer" : "Нет",

                          "AirTransferComment" : "-",

                          "AviaCompany" : null,

                          "AviaCompanyCode" : "YM",

                          "CrDate" : "13.03.2012",

                          "FlyClass" : "Economy",

                          "FlyNumber" : "613",

                          "FlyTime" : "16:55",

                          "FromAirport" : "DMD",

                          "FromCity" : "Москва",

                          "FromCountry" : "Россия",

                          "FromDate" : "16.06.2012",

                          "FromTime" : "14:55",

                          "HowMany" : "Есть",

                          "ID" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                          "Price" : 282.14999999999998,

                          "ReturnID" : null,

                          "Special" : 0,

                          "ToAirport" : "TIV",

                          "ToCity" : "Тиват",

                          "ToCountry" : "Черногория",

                          "i" : 17762

                        },

                      "TicketType" : {  },

                      "USDCurs" : 30.15531

                    }

                  ],

                "uid" : "6B468147-E57E-48FF-CF5C-F36FB03BE6E7"

              },

            "sort" : null,

            "source" : [ { "DirectTicket" : "b2ce0e6c-8ca1-4dff-a658-be046127bca9",

                  "DirectTicketInfo" : { "AirTransfer" : "Нет",

                      "AirTransferComment" : "-",

                      "AviaCompany" : null,

                      "AviaCompanyCode" : "YM",

                      "CrDate" : "13.03.2012",

                      "FlyClass" : "Economy",

                      "FlyNumber" : "612",

                      "FlyTime" : "14:20",

                      "FromAirport" : "TIV",

                      "FromCity" : "Тиват",

                      "FromCountry" : "Черногория",

                      "FromDate" : "15.06.2012",

                      "FromTime" : "09:20",

                      "HowMany" : "Есть",

                      "ID" : "b2ce0e6c-8ca1-4dff-a658-be046127bca9",

                      "Price" : 282.14999999999998,

                      "ReturnID" : null,

                      "Special" : 0,

                      "ToAirport" : "DMD",

                      "ToCity" : "Москва",

                      "ToCountry" : "Россия",

                      "i" : 18107

                    },

                  "ReturnTicket" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                  "ReturnTicketInfo" : { "AirTransfer" : "Нет",

                      "AirTransferComment" : "-",

                      "AviaCompany" : null,

                      "AviaCompanyCode" : "YM",

                      "CrDate" : "13.03.2012",

                      "FlyClass" : "Economy",

                      "FlyNumber" : "613",

                      "FlyTime" : "16:55",

                      "FromAirport" : "DMD",

                      "FromCity" : "Москва",

                      "FromCountry" : "Россия",

                      "FromDate" : "16.06.2012",

                      "FromTime" : "14:55",

                      "HowMany" : "Есть",

                      "ID" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                      "Price" : 282.14999999999998,

                      "ReturnID" : null,

                      "Special" : 0,

                      "ToAirport" : "TIV",

                      "ToCity" : "Тиват",

                      "ToCountry" : "Черногория",

                      "i" : 17762

                    },

                  "TicketType" : {  },

                  "USDCurs" : 30.15531

                },

                { "DirectTicket" : "925ca5a3-41d4-4600-bed0-66819b65f653",

                  "DirectTicketInfo" : { "AirTransfer" : "Нет",

                      "AirTransferComment" : "-",

                      "AviaCompany" : null,

                      "AviaCompanyCode" : "YM",

                      "CrDate" : "13.03.2012",

                      "FlyClass" : "Economy",

                      "FlyNumber" : "614",

                      "FlyTime" : "01:10",

                      "FromAirport" : "TIV",

                      "FromCity" : "Тиват",

                      "FromCountry" : "Черногория",

                      "FromDate" : "15.06.2012",

                      "FromTime" : "20:10",

                      "HowMany" : "Есть",

                      "ID" : "925ca5a3-41d4-4600-bed0-66819b65f653",

                      "Price" : 282.14999999999998,

                      "ReturnID" : null,

                      "Special" : 0,

                      "ToAirport" : "DMD",

                      "ToCity" : "Москва",

                      "ToCountry" : "Россия",

                      "i" : 18106

                    },

                  "ReturnTicket" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                  "ReturnTicketInfo" : { "AirTransfer" : "Нет",

                      "AirTransferComment" : "-",

                      "AviaCompany" : null,

                      "AviaCompanyCode" : "YM",

                      "CrDate" : "13.03.2012",

                      "FlyClass" : "Economy",

                      "FlyNumber" : "613",

                      "FlyTime" : "16:55",

                      "FromAirport" : "DMD",

                      "FromCity" : "Москва",

                      "FromCountry" : "Россия",

                      "FromDate" : "16.06.2012",

                      "FromTime" : "14:55",

                      "HowMany" : "Есть",

                      "ID" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                      "Price" : 282.14999999999998,

                      "ReturnID" : null,

                      "Special" : 0,

                      "ToAirport" : "TIV",

                      "ToCity" : "Тиват",

                      "ToCountry" : "Черногория",

                      "i" : 17762

                    },

                  "TicketType" : {  },

                  "USDCurs" : 30.15531

                },

                { "DirectTicket" : "c0ae6276-1085-422c-87e5-f1b4c17b8e72",

                  "DirectTicketInfo" : { "AirTransfer" : "Нет",

                      "AirTransferComment" : "-",

                      "AviaCompany" : null,

                      "AviaCompanyCode" : "YC",

                      "CrDate" : "13.03.2012",

                      "FlyClass" : "Economy",

                      "FlyNumber" : "445",

                      "FlyTime" : "15:00",

                      "FromAirport" : "TIV",

                      "FromCity" : "Тиват",

                      "FromCountry" : "Черногория",

                      "FromDate" : "15.06.2012",

                      "FromTime" : "10:00",

                      "HowMany" : "Есть",

                      "ID" : "c0ae6276-1085-422c-87e5-f1b4c17b8e72",

                      "Price" : 256.5,

                      "ReturnID" : null,

                      "Special" : 0,

                      "ToAirport" : "DMD",

                      "ToCity" : "Москва",

                      "ToCountry" : "Россия",

                      "i" : 18104

                    },

                  "ReturnTicket" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                  "ReturnTicketInfo" : { "AirTransfer" : "Нет",

                      "AirTransferComment" : "-",

                      "AviaCompany" : null,

                      "AviaCompanyCode" : "YM",

                      "CrDate" : "13.03.2012",

                      "FlyClass" : "Economy",

                      "FlyNumber" : "613",

                      "FlyTime" : "16:55",

                      "FromAirport" : "DMD",

                      "FromCity" : "Москва",

                      "FromCountry" : "Россия",

                      "FromDate" : "16.06.2012",

                      "FromTime" : "14:55",

                      "HowMany" : "Есть",

                      "ID" : "1d730314-0e8d-4b2e-9fe6-52d0eed2f8c2",

                      "Price" : 282.14999999999998,

                      "ReturnID" : null,

                      "Special" : 0,

                      "ToAirport" : "TIV",

                      "ToCity" : "Тиват",

                      "ToCountry" : "Черногория",

                      "i" : 17762

                    },

                  "TicketType" : {  },

                  "USDCurs" : 30.15531

                }

              ]

          }

           

          with Adobe top class JSON I am have only error (at mx.collections::ListCollectionView ...)