2017 © Pedro Peláez
 

library gjson

Generate output based on Google JSON style guide

image

normeno/gjson

Generate output based on Google JSON style guide

  • Tuesday, November 7, 2017
  • by normeno
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 150 % Grown

The README.md

Gjson

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Gjson is a PHP library to work under the Google Json Style Guide standard., (*2)

Install

Via Composer, (*3)

``` bash $ composer require normeno/gjson, (*4)


## Usage ### Remove Empties ``` php $format = new Format(); echo $format->removeEmpty(['foo' => 'bar', 'null' => null, 'empty' => '', 'zero' => 0]);

Set RFC3339

``` php $format = new Format(); echo $format->setRfc3339('1989-10-05');, (*5)


### Convert Snake to Camel ``` php $format = new Format(); echo $format->convertSnakeToCamel([ 'laTaM_cOuNtRy' => 'Chile', 'latam_REGION' => 'Metropolitana', 'LATAM_city' => 'Santiago' ]);

Set ISO-6793

``` php $format = new Format(); echo $format->setIso6709(['+40.6894', '-074.0447']);, (*6)


### Error Response ``` php $response = new Response(); echo $this->response->error(404, 'File Not Found');

Success Response

``` php $response = new Response(); $data = [ 'items' => [ 'company' => 'Google', 'website' => 'https://www.google.com/' ] ];, (*7)

echo $this->response->success($data);, (*8)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*9)

Security

If you discover any security related issues, please email ni.ormeno@gmail.com instead of using the issue tracker., (*10)

Credits

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

07/11 2017

dev-master

9999999-dev https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.9

1.0.9.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.7

1.0.7.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.8

1.0.8.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.6

1.0.6.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.5

1.0.5.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.4

1.0.4.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.3

1.0.3.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.2

1.0.2.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

07/11 2017

v1.0.1

1.0.1.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

06/11 2017

v1.0.0

1.0.0.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

06/11 2017

v0.4

0.4.0.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

06/11 2017

v0.3

0.3.0.0 https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson

02/11 2017

dev-dev

dev-dev https://github.com/normeno/gjson

Generate output based on Google JSON style guide

  Sources   Download

MIT

The Requires

 

The Development Requires

normeno gjson