function JSON::_unserializeArray in Drupal Most Popular 7
JSON Array Parser
This method transform an json-array into a PHP array @access private
Parameters
string $text String to parse: @return Array PHP Array
1 call to JSON::_unserializeArray()
- JSON::_unserialize in modules/
mostpopular_disqus/ disqusapi/ json.php - UnSerialize
File
- modules/
mostpopular_disqus/ disqusapi/ json.php, line 176
Class
- JSON
- JSON
Code
function _unserializeArray($text) {
$r = array();
do {
$f = $this
->getNextToken($text, $i, $type);
switch ($type) {
case IN_STRING:
case IN_ATOMIC:
$r[] = $f;
break;
case IN_OBJECT:
$r[] = $this
->unserialize("{" . $f . "}");
$i--;
break;
case IN_ARRAY:
$r[] = $this
->_unserializeArray($f);
$i--;
break;
}
$this
->getNextToken($text, $i, $type);
} while ($type == IN_ENDSTMT);
return $r;
}