1 Star 1 Fork 0

rryqszq4 / php-yajl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

php-yajl

Build Status

The php-yajl is a simple fast JSON parsing and generation library YAJL(Yet Another JSON Library), Bindings for php extension.

You can read more info at the project's website http://lloyd.github.com/yajl

Install

$/path/to/phpize
$./configure --with-php-config=/path/to/php-config
$make && make install

Example

generation

<?php

$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"}]";
*/

?>

parsing

<?php

$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 php-yajl is a simple fast JSON parsing and generation library YAJL(Yet Another JSON Library), Bindings for php extension. 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/rryqszq4/php-yajl.git
git@gitee.com:rryqszq4/php-yajl.git
rryqszq4
php-yajl
php-yajl
master

搜索帮助