luminarix/laravel-jsonl-parser

Laravel 的 JSON Lines 解析器。

v1.1.0 2024-07-10 00:33 UTC

This package is auto-updated.

Last update: 2024-09-10 00:56:26 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

这里应该放你的描述。请限制在一段或两段之内。考虑添加一个小的示例。

安装

你可以通过 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)。请参阅 许可文件 了解更多信息。