【文件属性】:
文件名称:paperboat:PaperBoat - 流式 JSON 输出库
文件大小:8KB
文件格式:ZIP
更新时间:2021-06-05 22:56:13
php json stream PHP
PaperBoat - 流式 JSON 输出
这是 Streaming JSON 输出器的一个非常简单且非常具有 alpha 质量的实现。
给我看货
$ stream = new PaperBoat \ JsonStream ();
$ stream
-> startObject ()
-> property ( 'data' )
-> startArray ();
$ i = 0 ;
while ( $ row = $ pdoStmt -> fetch ( PDO :: FETCH_ASSOC )) {
$ i ++;
$ stream -> value ( $ row );
}
$ stream
-> stopArray ()
-> property ( 'meta' )
-> startObject ()
-> property ( 'co
【文件预览】:
paperboat-master
----composer.json(587B)
----.travis.yml(200B)
----tests()
--------JsonStreamTest.php(3KB)
--------StringOutputStream.php(361B)
----CONTRIBUTING.md(642B)
----src()
--------OutputStream.php(250B)
--------OutputStream()
--------JsonStream.php(5KB)
----LICENSE.md(1KB)
----.gitignore(20B)
----phpunit.xml.dist(634B)
----README.md(3KB)