Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rryqszq4/php-cjson

Fast JSON parsing and encoding support for PHP extension
https://github.com/rryqszq4/php-cjson

Last synced: about 2 months ago
JSON representation

Fast JSON parsing and encoding support for PHP extension

Awesome Lists containing this project

README

        

php-cjson
===========
[![Build Status](https://travis-ci.org/rryqszq4/php-cjson.svg?branch=master)](https://travis-ci.org/rryqszq4/php-cjson)

The php-cjson is a fast JSON parsing and encoding support for PHP extension.

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

Example
-------
**encode**
```php
"value")
);
var_dump(cjson_encode($arr));

/* ==>output
string(28) "[1,"string",{"key":"value"}]";
*/
?>
```

**decode**
```php
output
array(3) {
[0]=>
int(1)
[1]=>
string(6) "string"
[2]=>
array(1) {
["key"]=>
string(5) "value"
}
}
*/
?>
```