function pageEntry($inPath) { $sm = new SJson(); $testObject = new stdclass(); $testObject->name = "SlightPHP"; $testObject->value = array("min" => 1, "max" => 999); /** * 编码 */ print_r($tmp = $sm->encode($testObject)); echo "\n"; /** * 解码 */ print_r($sm->decode($tmp)); }
public static function args2str($args) { self::obj2str($args); $tmp = SJson::encode($args); $tmp = str_replace("\\/", "/", $tmp); return substr($tmp, 1, strlen($tmp) - 2); }