luminarix / laravel-jsonl-parser
Laravel 的 JSON Lines 解析器。
v1.1.0
2024-07-10 00:33 UTC
Requires
- php: ^8.3
- illuminate/contracts: ^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.15
- nunomaduro/collision: ^8.1.1
- orchestra/testbench: ^9.0.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
README
这里应该放你的描述。请限制在一段或两段之内。考虑添加一个小的示例。
安装
你可以通过 composer 安装此包
composer require luminarix/laravel-jsonl-parser
使用方法
use Luminarix\JSONL\Facades\JSONL; $filePath = "path/to/file.jsonl"; JSONL::parse(string $filePath): LazyCollection JSONL::parseToDto(string $filePath, string $dtoClass): LazyCollection JSONL::encode(array|Collection|LazyCollection $objects): string JSONL::encodeFromDto(array|Collection|LazyCollection $dtos): string JSONL::write(string $filePath, array|Collection|LazyCollection $objects, bool $lock = false): void JSONL::writeFromDto(string $filePath, array|Collection|LazyCollection $dtos, bool $lock = false): void
测试
composer test
变更日志
请参阅 变更日志 了解最近的变化信息。
致谢
许可协议
MIT 许可协议 (MIT)。请参阅 许可文件 了解更多信息。