예제 #1
0
 /**
  * Pass in a JSON object to return it back as
  * an associative array
  * @param JSON $json
  */
 public static function &jsonToArray(JSON $json)
 {
     $array = array();
     for ($i = 0; $json->getCount() > $i; $i++) {
         $item = $json->itemAt($i);
         $array[$item->getProperty()] = $item->getValue();
     }
     return $array;
 }