2017 © Pedro Peláez
 

library json-seq

JSON Text Sequences (RFC7464) encoder and decoder

image

networkteam/json-seq

JSON Text Sequences (RFC7464) encoder and decoder

  • Tuesday, July 3, 2018
  • by chlu
  • Repository
  • 0 Watchers
  • 0 Stars
  • 106 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Package

Latest Version Build Status Code Coverage Quality Score Total Downloads, (*1)

JSON Text Sequences (RFC7464) encoder and decoder for PHP, (*2)

JSON Text Sequences define a streamable JSON encoding and parsing based on a delimiter for multiple JSON encoded texts., (*3)

See https://tools.ietf.org/html/rfc7464 for the JSON Text Sequences RFC., (*4)

Install

Via Composer, (*5)

``` bash $ composer require networkteam/json-seq, (*6)



## Usage Encoding data in JSON Text Sequences: ``` php $stringWriter = new StringWriter(); $encoder = new Encoder($stringWriter); $encoder->emit(['id' => '1', ...]); $encoder->emit(['id' => '2', ...]); $result = $stringWriter->getString();

Decoding JSON Text Sequences from a string:, (*7)

``` php $jsonTexts = "\x1E{...}\x0A\x1E{...}\x0A";, (*8)

$decoder = new StringDecoder(); foreach ($decoder->decode($jsonTexts) as $data) { // process $data }, (*9)


## Testing ``` bash $ composer test

License

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

The Versions

03/07 2018

dev-master

9999999-dev

JSON Text Sequences (RFC7464) encoder and decoder

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

json

03/07 2018

v1.0-alpha.2

1.0.0.0-alpha2

JSON Text Sequences (RFC7464) encoder and decoder

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

json

03/07 2018

v1.0-alpha

1.0.0.0-alpha

JSON Text Sequences (RFC7464) encoder and decoder

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

json