sgmendez/jsonbundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sgmendez/jsonbundle

最新稳定版本:v1.0.2

Composer 安装命令:

composer require sgmendez/jsonbundle

包简介

Symfony2 bundle for json encode and decode

关键字:

README 文档

README

License SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version

Library Json integration Symfony2 bundle.

Instalación

You can use Composer to use this library in your application.

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:

curl -s http://getcomposer.org/installer | php

And then execute this command to add libary to your project:

$ composer require sgmendez/jsonbundle

Or require sgmendez/json into your composer.json file:

json
{
    "require": {
        "sgmendez/jsonbundle": "*"
    }
}

Register bundle on appKernel:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Sgmendez\Bundle\JsonBundle\JsonBundle(),
        // ...
    );
}

Use

For string JSON data:

php

$json = $this->get('json.parser');
$a = $json->decode($stringJson);

For local file JSON data:

php

$json = $this->get('json.parser');
$a = $json->decodeFile('file.json');

For remote file JSON data:

php

$json = $this->get('json.parser');
$a = $json->decodeFile('http://ip.jsontest.com/');

License

Licensed under the BSD License:

http://opensource.org/licenses/bsd-license.php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2015-03-20