定制 tkzo/huge-json-collection-streaming-parser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tkzo/huge-json-collection-streaming-parser

Composer 安装命令:

composer require tkzo/huge-json-collection-streaming-parser

包简介

A streaming parser for huge JSON in PHP.

README 文档

README

Build Status GitHub tag Packagist Minimum PHP Version License

This package is streaming parser for processing huge JSON documents. Can load the objects of JSON documents which is an array of objects one by one. The structure of JSON documents needs to be the following structure.

e.g.)

[
  {
    "id": 1,
    "name": "foo",

    ...

  },
  {
    "id": 2,
    "name": "bar",

    ...

  },

  ...

]

This package is compliant with PSR-4, PSR-1, and PSR-2. If you notice compliance oversights, please send a patch via pull request.

Installation

To install HugeJsonCollectionStreamingParser you can either clone this repository or you can use composer.

composer require tkzo/huge-json-collection-streaming-parser

Usage

$filePath = 'path/to/huge-json-file.json';

$parser = new \HugeJsonCollectionStreamingParser\Parser($filePath);

while ($parser->next()) {
    $item = $parser->current();

    // do anything...
}

There is a complete example of this in example/example.php.

License

MIT License

统计信息

  • 总下载量: 97
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固