2017 © Pedro Peláez
 

library json

A class to use the basic of json.

image

otaavioo/json

A class to use the basic of json.

  • Monday, May 22, 2017
  • by otaavioo
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3,848 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 10 % Grown

The README.md

JSON

Build Coverage Status, (*1)

A light package for json encode/decode functions, (*2)

Installing

composer require otaavioo/json ^2.0

Encode

    // Instantiate the class
    $json = new Json();

    $array = ['key' => 'value'];

    // And then, get encoded json
    echo $json->encode($array);

Decode

    // Instantiate the class
    $json = new Json();

    $string = '{"key":"value"}';

    // And then, get decoded json
    echo $json->decode($string);

    // And if you have a doubly encoded json, like this
    $string = '{\"key\":\"value\"}';

    // The decode method will return the same object as before
    echo $json->decode($string);

Valid

    // Instantiate the class
    $json = new Json();

    $string = '{"key":"value"}';

    // And then, check if is valid
    echo $json->isValid($string);

Developing

  • To install dependencies, please, run composer install

Testing

  • You can simply run php vendor/bin/phpunit to test using PHPUnit

The Versions

22/05 2017

dev-master

9999999-dev

A class to use the basic of json.

  Sources   Download

The Requires

  • php >=5.5.9

 

The Development Requires

by Otávio Augusto Borges Pinto

22/05 2017

1.1.1

1.1.1.0

A class to use the basic of json.

  Sources   Download

The Requires

  • php >=5.5.9

 

The Development Requires

by Otávio Augusto Borges Pinto

11/05 2017

1.1.0

1.1.0.0

A class to use the basic of json.

  Sources   Download

The Requires

  • php >=5.5.9

 

The Development Requires

by Otávio Augusto Borges Pinto

28/04 2017

1.0.1

1.0.1.0

A class to use the basic of json.

  Sources   Download

The Requires

  • php >=5.5.9

 

The Development Requires

by Otávio Augusto Borges Pinto

29/08 2016

1.0.0

1.0.0.0

A class to use the basic of json.

  Sources   Download

The Requires

 

The Development Requires

by Otávio Augusto Borges Pinto

29/08 2016

dev-dev-master

dev-dev-master

A class to use the basic of json.

  Sources   Download

The Requires

 

The Development Requires

by Otávio Augusto Borges Pinto