Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rryqszq4/php-yajl
A fast JSON parsing/generation library YAJL in PHP extension
https://github.com/rryqszq4/php-yajl
Last synced: about 2 months ago
JSON representation
A fast JSON parsing/generation library YAJL in PHP extension
- Host: GitHub
- URL: https://github.com/rryqszq4/php-yajl
- Owner: rryqszq4
- Created: 2015-12-21T11:03:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T00:14:03.000Z (almost 8 years ago)
- Last Synced: 2024-04-18T03:12:43.053Z (9 months ago)
- Language: C
- Homepage:
- Size: 57.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
php-yajl
========
[![Build Status](https://travis-ci.org/rryqszq4/php-yajl.svg?branch=master)](https://travis-ci.org/rryqszq4/php-yajl)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](http://lloyd.github.com/yajl)
Install
-------
```
$/path/to/phpize
$./configure --with-php-config=/path/to/php-config
$make && make install
```Example
-------
**generation**
```php
"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
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"
}
}
*/?>
```