Skip to content

Commit a4429b7

Browse files
committed
Update README.md
1 parent 85aca00 commit a4429b7

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
# clue/json-stream [![Build Status](https://travis-ci.org/clue/php-json-stream.svg?branch=master)](https://travis-ci.org/clue/php-json-stream)
22

3-
A really simple and lightweight incremental streaming JSON parser
3+
A really simple and lightweight, incremental parser for [JSON streaming](https://en.wikipedia.org/wiki/JSON_Streaming), in PHP.
4+
5+
You can use this library to process a stream of data that consists of multiple JSON documents
6+
separated by newlines, whitespace or as concatenated JSON without whitespace.
7+
8+
An example stream consisting of 3 individual JSON documents could look like this:
9+
```json
10+
{ "id": 1, "name": "first" }{ "id": 3, "name": "third" }{ "id": 6, "name": "sixth"}
11+
```
12+
13+
The input stream can be of arbitrary size and can be interrupted at any time.
14+
This is often useful for processing network streams, where the chunk/buffer size is
15+
not under your control and you could potentially read single bytes only.
16+
17+
Please note that this library is about processing a stream that can contain any number of
18+
JSON documents.
19+
It is assumed that each document has a reasonable size and fits into memory.
20+
This is not to be confused with a streaming parser for processing a single, huge JSON document
21+
that is too big to fit into memory.
422

523
> Note: This project is in beta stage! Feel free to report any issues you encounter.
624

0 commit comments

Comments
 (0)