22/07
2016
PHP library to encode and decode JSON
// 1. 引入autoload.php, (*1)
require './vendor/autoload.php';, (*2)
$data = [ 'name' => 'zs', 'age' => 18 ];, (*3)
// 调用 Json的encode静态方法 序列化数据 $jsondata = \phptestsoft8\Json::encode($data);, (*4)
print_r($jsondata);, (*5)