JSON 解析/生成库 php-yajl
- 授权协议: 未知
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/rryqszq4/php-yajl
- 软件文档: https://github.com/rryqszq4/php-yajl
软件介绍
php-yajl 是简单快速的 JSON 解析和生成库,YAJL(Yet Another JSON Library),绑定 PHP 扩展。
安装:
$/path/to/phpize $./configure --with-php-config=/path/to/php-config $make && make install
示例
生成:
$arr = array(
1,
"string",
array("key"=>"value")
);
var_dump(yajl_generate($arr));
/* ==>output
string(28) "[1,"string",{"key":"value"}]";
*/
var_dump(yajl::generate($arr));
/* ==>output
string(28) "[1,"string",{"key":"value"}]";
*/
解析
$str = '[1,"string",{"key":"value"}]';
var_dump(yajl_parse($str));
/* ==>output
array(3) {
[0]=>
int(1)
[1]=>
string(6) "string"
[2]=>
array(1) {
["key"]=>
string(5) "value"
}
}
*/
var_dump(yajl::parse($str));
/* ==>output
array(3) {
[0]=>
int(1)
[1]=>
string(6) "string"
[2]=>
array(1) {
["key"]=>
string(5) "value"
}
}
*/
The Ruby Programming Language
David Flanagan、Yukihiro Matsumoto / O'Reilly Media, Inc. / 2008 / USD 39.99
Ruby has gained some attention through the popular Ruby on Rails web development framework, but the language alone is worthy of more consideration -- a lot more. This book offers a definition explanat......一起来看看 《The Ruby Programming Language》 这本书的介绍吧!
