equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Json |
16 * @package Zend_Json |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Decoder.php 22653 2010-07-22 18:41:39Z mabe $ |
19 * @version $Id: Decoder.php 24799 2012-05-12 19:27:07Z adamlundrigan $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @see Zend_Json |
23 * @see Zend_Json |
24 */ |
24 */ |
27 /** |
27 /** |
28 * Decode JSON encoded string to PHP variable constructs |
28 * Decode JSON encoded string to PHP variable constructs |
29 * |
29 * |
30 * @category Zend |
30 * @category Zend |
31 * @package Zend_Json |
31 * @package Zend_Json |
32 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
34 */ |
34 */ |
35 class Zend_Json_Decoder |
35 class Zend_Json_Decoder |
36 { |
36 { |
37 /** |
37 /** |
234 switch ($this->_decodeType) { |
234 switch ($this->_decodeType) { |
235 case Zend_Json::TYPE_OBJECT: |
235 case Zend_Json::TYPE_OBJECT: |
236 // Create new StdClass and populate with $members |
236 // Create new StdClass and populate with $members |
237 $result = new StdClass(); |
237 $result = new StdClass(); |
238 foreach ($members as $key => $value) { |
238 foreach ($members as $key => $value) { |
|
239 if ($key === '') { |
|
240 $key = '_empty_'; |
|
241 } |
239 $result->$key = $value; |
242 $result->$key = $value; |
240 } |
243 } |
241 break; |
244 break; |
242 case Zend_Json::TYPE_ARRAY: |
245 case Zend_Json::TYPE_ARRAY: |
243 default: |
246 default: |