2017 © Pedro Peláez
 

library json

The Hoa\Json library.

image

hoa/json

The Hoa\Json library.

  • Tuesday, January 23, 2018
  • by Hoa
  • Repository
  • 10 Watchers
  • 9 Stars
  • 1,134 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 12 Versions
  • 7 % Grown

The README.md

Hoa , (*1)


Build status Code coverage Packagist License , (*2)

Hoa is a modular, extensible and structured set of PHP libraries.
Moreover, Hoa aims at being a bridge between industrial and research worlds. , (*3)

Hoa\Json

Help on IRC Help on Gitter Documentation Board, (*4)

This library provides only the grammar of JSON in the PP format (see the Hoa\Compiler library)., (*5)

Learn more., (*6)

Installation

With Composer, to include this library into your dependencies, you need to require hoa/json:, (*7)

$ composer require hoa/json '~2.0'

For more installation procedures, please read the Source page., (*8)

Testing

Before running the json suites, the development dependencies must be installed:, (*9)

$ composer install

Then, to run all the test suites:, (*10)

$ vendor/bin/hoa test:run

For more information, please read the contributor guide., (*11)

Quick usage

As a quick overview, we will see how to use the grammar to parse JSON strings., (*12)

Parse JSON strings

All we have to do is to use the Hoa\Compiler library. For instance, in CLI:, (*13)

$ echo '{"foo": 42, "bar": [1, [2, [3, 5], 8], 13]}' | hoa compiler:pp hoa://Library/Json/Grammar.pp 0 -v dump
>  #object
>  >  #pair
>  >  >  token(string:string, foo)
>  >  >  token(number, 42)
>  >  #pair
>  >  >  token(string:string, bar)
>  >  >  #array
>  >  >  >  token(number, 1)
>  >  >  >  #array
>  >  >  >  >  token(number, 2)
>  >  >  >  >  #array
>  >  >  >  >  >  token(number, 3)
>  >  >  >  >  >  token(number, 5)
>  >  >  >  >  token(number, 8)
>  >  >  >  token(number, 13)

Documentation

The hack book of Hoa\Json contains detailed information about how to use this library and how it works., (*14)

To generate the documentation locally, execute the following commands:, (*15)

$ composer require --dev hoa/devtools
$ vendor/bin/hoa devtools:documentation --open

More documentation can be found on the project's website: hoa-project.net., (*16)

Getting help

There are mainly two ways to get help:, (*17)

Contribution

Do you want to contribute? Thanks! A detailed contributor guide explains everything you need to know., (*18)

License

Hoa is under the New BSD License (BSD-3-Clause). Please, see LICENSE for details., (*19)

The Versions

13/01 2017
15/08 2016
25/08 2015

1.15.08.25

1.15.08.25 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

json library grammar

29/05 2015

1.15.05.29

1.15.05.29 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

json library grammar

23/02 2015

1.15.02.23

1.15.02.23 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

json library grammar

09/12 2014

1.14.12.10

1.14.12.10 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

json library grammar

25/11 2014

1.14.11.26

1.14.11.26 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

json library grammar

09/11 2014

1.14.11.15

1.14.11.15 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

json library grammar

03/10 2014

1.14.10.03

1.14.10.03 http://hoa-project.net/

The Hoa\Json library.

  Sources   Download

BSD-3-Clause

The Requires

 

json library grammar