2017 © Pedro PelĂĄez
 

library json-builder

image

borisguery/json-builder

  • Tuesday, January 13, 2015
  • by borisguery
  • Repository
  • 1 Watchers
  • 3 Stars
  • 20,097 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 11 % Grown

The README.md

JSON Builder

Allow to build a JSON string programmatically, (*1)

Build Status Scrutinizer Code Quality, (*2)

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, (*3)

["Foo", 123]

Installation

Install the library package with composer:, (*4)

$ php composer.phar require borisguery/json-builder

Usage

Known limitations

Testing

Install development dependencies, (*5)

$ composer install --dev

Run the test suite, (*6)

$ 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, (*7)

License

This library is under the MIT license - see the LICENSE file for details, (*8)

The Versions

13/01 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Development Requires

13/01 2015

0.2.0

0.2.0.0

  Sources   Download

MIT

The Development Requires

13/01 2015

0.1.0

0.1.0.0

  Sources   Download

MIT

The Development Requires