Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janeklb/jsoncharinputreader
Read and process JSON data streams, character by character
https://github.com/janeklb/jsoncharinputreader
Last synced: about 1 month ago
JSON representation
Read and process JSON data streams, character by character
- Host: GitHub
- URL: https://github.com/janeklb/jsoncharinputreader
- Owner: janeklb
- License: mit
- Created: 2011-11-01T15:11:38.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-05-22T09:18:14.000Z (over 9 years ago)
- Last Synced: 2024-10-12T16:58:18.274Z (2 months ago)
- Language: PHP
- Homepage:
- Size: 179 KB
- Stars: 24
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
janeklb\json\JSONCharInputReader
====================This is a stream reader used to process JSON data character-by-character and execute callbacks
after parsing complete chunks.The data stream must be in the form of a JSON array.
ie. `[1, 2, [3, 4], {"five": "six"}, ...`Example
=======To get a feel for it, run the following in your terminal:
```bash
$ cat | php example/example.php
```[Terminate with CTRL^D or CTRL^C]
Testing
=======Install composer with dev dependencies `composer install --dev` and run
```bash
$ ./vendor/bin/phpunit test/
```Todo
====- fire callbacks on deeper nested values, rather than "top level" entries in the stream array
License
=======Distributed under the [MIT Licence](LICENSE)