|
|
|
#
1. json_decode Լ
2. Ŭ
3. decode ϱ
json.php include Ŀ ! Ŭ մϴ.
$test = new Services_JSON();
= $test->decode(decode , true);
̷ ϸ Ǵµ !
but... object Ƿ Լ ߰մϴ !
Ŭ κ Լ ߰ ּ !
if ( !function_exists('json_decode') ){
function json_decode($json)
{
// Author: walidator.info 2009
$comment = false;
$out = '$x=';
for ($i=0; $i<strlen($json); $i++)
{
if (!$comment)
{
if ($json[$i] == '{') $out .= ' array(';
else if ($json[$i] == '}') $out .= ')';
else if ($json[$i] == ':') $out .= '=>';
else $out .= $json[$i];
}
else $out .= $json[$i];
if ($json[$i] == '"') $comment = !$comment;
}
eval($out . ';');
return $x;
}
}
|
|
|
|
|
|
|
|
|
|
ϱ
|
ϱ
|
|
|
|
|
|
|