static function UnPackJson($bytearray, &$seek, $pubdict, $localdict) { $b = $bytearray[$seek]; $seek++; $t1 = ($b & 128) > 0; $t2 = ($b & 64) > 0; if ($t1 && !$t2) { return JsonPack::UnPackJsonNumber($bytearray, $seek, $b); } else { if ($t1 && $t2) { return JsonPack::UnPackJsonString($bytearray, $seek, $b, $pubdict, $localdict); } else { if (!$t1 && !$t2) { return JsonPack::UnPackJsonArray($bytearray, $seek, $b, $pubdict, $localdict); } else { return JsonPack::UnPackJsonObject($bytearray, $seek, $b, $pubdict, $localdict); } } } }