Details
Description
This piece of JSON was created with Zend_Json_Encoder::encode
{"_className":"fgSDK_Types_TTrip","IDuser":1,"Smoker":"flex","NumberPlate":"WI-EN 89","Places":2,"Contactlandline":"0221 54899","Contactmobile":"0175 54899","Description":"ich fahre nach k\u00f6ln","ClientIP":"192.168.1.20","Triptype":"offer","Routings":{"className":"fgSDK_Types_TRoutingCollection",0:{"className":"fgSDK_Types_TRouting","Origin":{"className":"fgSDK_Types_TPlace","Address":"K\u00f6ln, Deutschland","Accuracy":4,"CountryCode":"DE","CountryName":"Deutschland","Longitude":6.9599115,"Latitude":50.9406645,"Placetype":"geo","LatLonBox":{"className":"fgSDK_Types_TLatLonBox","North":51.0530233,"South":50.8280335,"East":7.2160303,"West":6.7037927}},"Destination":{"className":"fgSDK_Types_TPlace","Address":"Hamburg, Deutschland","Accuracy":4,"CountryCode":"DE","CountryName":"Deutschland","Longitude":9.9921962,"Latitude":53.5534074,"Placetype":"geo","LatLonBox":{"_className":"fgSDK_Types_TLatLonBox","North":53.6593331,"South":53.4472158,"East":10.248315,"West":9.7360774}},"RoutingIndex":-1}}}
During Decoding using Zend_Json_Decoder::decode this exception is thrown:
Message: Missing key in object encoding: {"_className":"fgSDK_Types_TTrip","IDuser":1,"Smoker":"flex","NumberPlate":"WI-EN 89","Places":2,"Contactlandline":"0221 54899","Contactmobile":"0175 54899","Description":"ich fahre nach köln","ClientIP":"192.168.1.20","Triptype":"offer","Routings":{"className":"fgSDK_Types_TRoutingCollection",0:{"className":"fgSDK_Types_TRouting","Origin":{"className":"fgSDK_Types_TPlace","Address":"Köln, Deutschland","Accuracy":4,"CountryCode":"DE","CountryName":"Deutschland","Longitude":6.9599115,"Latitude":50.9406645,"Placetype":"geo","LatLonBox":{"className":"fgSDK_Types_TLatLonBox","North":51.0530233,"South":50.8280335,"East":7.2160303,"West":6.7037927}},"Destination":{"className":"fgSDK_Types_TPlace","Address":"Hamburg, Deutschland","Accuracy":4,"CountryCode":"DE","CountryName":"Deutschland","Longitude":9.9921962,"Latitude":53.5534074,"Placetype":"geo","LatLonBox":{"_className":"fgSDK_Types_TLatLonBox","North":53.6593331,"South":53.4472158,"East":10.248315,"West":9.7360774}},"RoutingIndex":-1}}}
Stack trace:
#0 D:\server\lib\zend1.10\Zend\Json\Decoder.php(174): Zend_Json_Decoder->_decodeObject()
#1 D:\server\lib\zend1.10\Zend\Json\Decoder.php(219): Zend_Json_Decoder->_decodeValue()
#2 D:\server\lib\zend1.10\Zend\Json\Decoder.php(174): Zend_Json_Decoder->_decodeObject()
#3 D:\server\lib\zend1.10\Zend\Json\Decoder.php(156): Zend_Json_Decoder->_decodeValue()
#4 D:\dev\web[REMOVED]\service.[REMOVED]\trunk\application\controllers\TripController.php(38): Zend_Json_Decoder::decode('{"__className":...')
#5 D:\server\lib\zend1.10\Zend\Controller\Action.php(513): TripController->putAction()
#6 D:\server\lib\zend1.10\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action->dispatch('putAction')
#7 D:\server\lib\zend1.10\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#8 D:\server\lib\zend1.10\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#9 D:\server\lib\zend1.10\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#10 D:\dev\web[REMOVED]\service.[REMOVED]\trunk\public\index.php(76): Zend_Application->run()
#11 {main}
Could you please provide the source data (array/object) for debugging?