Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Json Parser

Json Parser Laravel Package

keboola/json-parser

A PHP library from Keboola for parsing JSON into PHP data structures, with configurable options for handling JSON strings and files. Lightweight and straightforward to integrate into existing PHP projects.

View on GitHub
Deep Wiki
Context7

Json to CSV files parser & analyzer

Frequently asked questions about Json Parser
How do I install keboola/json-parser with Composer in a Laravel app?
Run composer require keboola/json-parser and let Composer autoload it. There is no publishable config or Laravel package manifest, so installation is just the dependency plus your own wiring. Pin an exact version because the package's documented behavior and actual API have been reported to differ between releases. Verify the PHP constraint of the pinned release before installing on Laravel 10 or 11.
Does keboola/json-parser have a Laravel service provider or facade?
No. keboola/json-parser is framework-agnostic and ships no service provider, facade, config file, or contract, so it will not feel Laravel-native. Keep it out of controllers and models and treat it as an implementation detail behind your own interface. The sane wiring is a singleton binding in AppServiceProvider that injects the required PSR-3 logger.
Does keboola/json-parser return PHP arrays or write CSV files?
The published description says it decodes JSON into PHP arrays, but code-level review and sibling reports describe a JSON-to-CSV flattener that writes one or more CSV files to a temp directory and returns CsvFile or File value objects. Treat the metadata as unreliable and validate the exact release against real payloads. If humans will open the CSV output in Excel, also consider formula-injection sanitization.
How do I use keboola/json-parser in a Laravel queue job or Artisan command?
Use it only inside queued jobs, Artisan commands, or scheduled exports, never on the request/response path. The output is file-oriented, so you must read it back, move it with Storage, or stream it yourself. Bind a thin exporter interface as a singleton and let the job depend on that interface rather than the Parser class.
How do I set the temp directory for keboola/json-parser in a Docker container?
The package pulls Keboola's temp and utility dependencies, which assume a writable system temp directory and Symfony Filesystem semantics. In containers, either configure storage/app/... explicitly or accept sys_get_temp_dir() on a sized, monitored tmpfs. Make the location configurable in your adapter and add cleanup so failed jobs do not leave orphaned CSV files.
Do I need to pass a PSR-3 logger to keboola/json-parser?
Yes, the Parser constructor expects a PSR-3 logger. In Laravel, resolve it through the container and inject Log::channel(...) or the default logger when binding your exporter singleton. Do not instantiate the parser ad hoc in jobs, or you will duplicate wiring and make tests harder.
How does keboola/json-parser handle nested arrays and dot-notation keys?
It uses opinionated flattening: nested object keys become dot-notation columns and nested arrays generate parent-link child tables. That contract is largely non-configurable, so heterogeneous arrays can explode columns or produce inconsistent headers. Confirm that downstream consumers depend on the exact header naming and ordering before committing.
Can keboola/json-parser handle large JSON files without memory issues?
Decoding is memory-bound and not a streaming parser, so monolithic documents above roughly 100 MB are a risk. There is no built-in handling for a hard streaming requirement; if you need that, pre-split payloads or choose a streaming alternative. Monitor memory and set job timeouts accordingly.
How should I wrap and test keboola/json-parser behind an interface in Laravel?
Test your adapter, not the library internals. Bind a fake JsonToCsvExporter in the container and assert that jobs call it with the expected JSON and options, then use a small integration test against a real payload to confirm the pinned release's CSV output. This also protects you if the upstream API changes.
Is keboola/json-parser actively maintained, and what are the alternatives?
Stewardship is the main risk: low stars, zero dependents, and no commercial support unless you have a Keboola relationship, so expect slow issue triage. MIT licensing and forkability cap the downside; pin the version and treat upgrades as manual reviews. Alternatives include league/csv plus your own flattener, or a vendored fork if you need the dot-notation and child-table semantics.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console