itcastsoft / json
PHP library to encode and decode JSON
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.0
2016-04-01 13:55 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2019-06-20 17:48:50 UTC
README
API
To use the library, see the example below:
<?php
// 引入autoload
require_once 'vendor/autoload.php';
// 引入外部库命名空间
use sevensoft\json\Json;
// 使用外部库
echo Json::encode("foo") . PHP_EOL;
echo Json::encode(array('foo' => 'bar')) . PHP_EOL;
echo var_export(Json::decode('{"foo":"bar"}')) . PHP_EOL;
License
Licensed under the Apache License, Version 2.0;