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 Laravel Package

cerbero/json-parser

A PHP/Laravel package for parsing large JSON files efficiently with low memory. Use JSONPath-style queries to extract exactly the data you need, stream huge documents without loading them fully, and integrate cleanly into Laravel apps for imports, APIs, and data processing.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature delivery: large-data ingestion without memory blowups. Enables imports, webhook ingestion, third-party exports, analytics dumps, and data-migration tooling where json_decode() would exceed memory_limit or crash queue workers.
  • Roadmap sequencing: unblock “big data” customer requests now. Customer asks like “can we import this 2 GB JSON export?” become a contained parsing task rather than a platform rewrite or a new streaming infrastructure project.
  • Build vs. buy: adopt vs. write an in-house streaming parser. MIT-licensed, zero-dependency, small API surface. The build case is weak unless you need strict SLAs, schema validation, or write support. Adopting keeps engineering focused on domain logic.
  • Infrastructure/cost decisions. Processing item-by-item can keep worker memory flat, allowing smaller queue workers and fewer retries from OOM kills. This can defer or avoid vertical scaling and reduce Horizon/queue operational cost.
  • Architecture decisions: stream sources directly. Works with file handles, HTTP responses, and storage streams (e.g., Laravel Storage::readStream()), so ingestion can begin before the full payload is downloaded.
  • Use cases to prioritize: queue jobs processing large API payloads, artisan import commands, S3/object-storage JSON files, NDJSON exports, ETL pipelines, and incremental sync jobs.
  • Risk posture decision. Quality score is solid (4.47), stars moderate (809), but adoption signals are weak (0 dependents) and the last release was August 2023. Treat it as a small, replaceable utility — not a strategic platform dependency.

When to Consider This Package

Consider adopting when:

  • JSON payloads routinely approach or exceed PHP’s memory_limit, or files are in the hundreds of MB to multi-GB range.
  • The source is streamable — file handle, HTTP response body, S3/object-storage stream — and buffering the whole document is wasteful or impossible.
  • You need item-by-item processing: per-record validation, transformation, queue dispatch, or database upserts.
  • You want a zero-dependency parser to minimize supply-chain and transitive-dependency risk.
  • You can pin the version, wrap it behind an internal adapter, and own contract tests around it.
  • The team accepts a low-ceremony utility with a small API rather than a fully managed data platform.

Look elsewhere when:

  • Payloads are small (tens of MB or less) and native json_decode() is simpler, faster, and already sufficient.
  • You need random access to the full document, complex traversal, or mutation/write support.
  • You require schema validation before processing; streaming validation is a separate concern and often easier with a full-document validator.
  • You need actively maintained releases, enterprise support, or a security-response SLA. Last release was 2023 and dependents are near zero — adoption risk is real.
  • Non-JSON formats are involved; CSV, XML, or Parquet have better-fit libraries.
  • Your platform standard is a broader streaming/ETL framework (e.g., custom ingestion service) where a single parser is the wrong abstraction level.

How to Pitch It (Stakeholders)

For executives: This is a small, free, MIT-licensed utility that lets us ingest very large JSON files without loading them fully into memory. It directly prevents out-of-memory failures in imports and background jobs, protects reliability during customer data onboarding, and can reduce worker sizing and infrastructure cost. It is low-risk to trial because it has no dependencies and can be removed behind an internal interface if needed.

For engineering leadership: The package is a pull-based streaming parser with a minimal API — iterate items lazily from a file, stream, or HTTP response. Zero dependencies keeps the supply chain clean. It is framework-agnostic but fits Laravel queue jobs and Artisan commands naturally. The trade-off is maturity: last release in 2023, low dependent count, single-maintainer risk. Mitigate by pinning the version, wrapping it in our own parser adapter, adding contract tests for our payload shapes, and forking if maintenance stops. This is a tactical “buy” that avoids building and maintaining a streaming JSON parser ourselves.

For the delivery team: Start with one bounded use case — a large import command or queue job — and measure peak memory and throughput against the current json_decode() approach. If it delivers flat memory and acceptable throughput, expand to other ingestion paths; if not, the adapter boundary keeps the rollback cheap.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings