File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
# clue/json-stream [ ![ Build Status] ( https://travis-ci.org/clue/php-json-stream.svg?branch=master )] ( https://travis-ci.org/clue/php-json-stream )
2
2
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.
4
22
5
23
> Note: This project is in beta stage! Feel free to report any issues you encounter.
6
24
You can’t perform that action at this time.
0 commit comments