定制 eastwest/json 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

eastwest/json

最新稳定版本:v3.0.1

Composer 安装命令:

composer require eastwest/json

包简介

Wrap JSON encoding/decoding errors in exception

README 文档

README

Catch json_encode() and json_decode() errors without executing json_last_error(). In PHP 7.3 these functions will throw an exception.

use Eastwest\Json\Json;
use Eastwest\Json\JsonException;

try {
    $json = Json::encode(['key' => 'value']);
} catch (JsonException $e) {
    // code and message will match json_last_error() values:
    // @link http://php.net/manual/en/function.json-last-error.php#refsect1-function.json-last-error-returnvalues 
    echo $e->getMessage();
    echo $e->getCode();
}

Installation

You'll have to follow a couple of simple steps to install this package.

Downloading

Via composer:

$ composer require eastwest/json:^3.0

Or add the package to your development dependencies in composer.json and run composer update eastwest/json to download the package:

{
    "require": {
        "eastwest/json": "^3.0"
    }
}

If you need a way to deploy files or manage your Laravel Forge servers. Take a look at GitFTP-Deploy or F-Bar

统计信息

  • 总下载量: 209.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 93
  • 点击次数: 3
  • 依赖项目数: 9
  • 推荐数: 0

GitHub 信息

  • Stars: 93
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固