定制 borisguery/json-builder 二次开发

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

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

borisguery/json-builder

最新稳定版本:0.2.0

Composer 安装命令:

composer require borisguery/json-builder

包简介

README 文档

README

Allow to build a JSON string programmatically

Build Status Scrutinizer Code Quality

Table of contents

  1. Overview
  2. Installation
  3. Usage
  4. Known limitations
  5. Testing
  6. Contributing
  7. Authors
  8. License

Overview

<?php

require __DIR__ . '/vendor/autoload.php';

use JsonBuilder\Builder\JsonBuilder;

$jb = new JsonBuilder();
$root = $jb->root('array');
$root
    ->children()
        ->string()
            ->value('Foo')
        ->end()
        ->number()
            ->value(123)
        ->end()
    ->end()
->end();

$json = $jb->build()->toJson();

echo $json;

The above code will return

["Foo", 123]

Installation

Install the library package with composer:

$ php composer.phar require borisguery/json-builder

Usage

Known limitations

Testing

Install development dependencies

$ composer install --dev

Run the test suite

$ vendor/bin/phpunit

Contributing

  1. Take a look at the list of issues.
  2. Fork
  3. Write a test (for either new feature or bug)
  4. Make a PR

Authors

Boris Guéry - guery.b@gmail.com - http://borisguery.com - @borisguery

License

This library is under the MIT license - see the LICENSE file for details

统计信息

  • 总下载量: 43.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-13