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

mtarld/json-encoder-bundle

Symfony bundle that integrates mtarld/json-encoder into your app, letting you encode and decode PHP objects to and from JSON with support for denormalization, validation, and typed collections.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature feasibility for streaming/large-payload JSON APIs. The underlying idea — an incremental JSON encoder that writes output as it goes instead of materializing a full array in memory — is directly relevant to decisions about export endpoints, NDJSON/JSON Lines feeds, and API responses that today spike memory or hit memory_limit under load. This package is useful as prior art for that decision, not as a dependency for it.
  • Build vs. buy vs. borrow. The realistic output of evaluating this package is a "borrow" decision: read the implementation, adopt the pattern (yield from a generator into json_encode per record, or Symfony's StreamedJsonResponse), and skip the install. This is a legitimate and cheap outcome that still de-risks a roadmap item.
  • Runtime/infrastructure roadmap. If you run long-lived workers (Octane, RoadRunner, FrankenPHP, queue consumers) where per-request memory ceilings matter more than in classic FPM, a streaming encoder becomes an architecture question rather than a library question. The package helps frame that conversation.
  • Serializer abstraction posture. It forces an explicit answer to "do we standardize on Laravel/Symfony's serializer layer, or allow a specialized encoder on hot paths?" That's a decision worth recording in an ADR regardless of whether this package is used.
  • Vendor risk policy validation. With 10 stars, 0 dependents, a single maintainer, and an archived repository, this is a clean reference case for where your dependency bar sits. Use it to calibrate, not to ship.

When to Consider This Package

Adopt only if all of the following hold:

  • You are on Symfony, not Laravel — this is a bundle, and it has no Laravel service provider, config publishing, or facade story. In a Laravel codebase it is at best a transitive curiosity.
  • You need incremental/streaming JSON encoding badly enough to own the code: fork it, vendor it, pin it, and accept that no upstream fix or security patch will ever arrive.
  • You have verified it works on your PHP version and your framework version without fighting deprecations, and your team has the capacity to maintain a fork indefinitely.
  • The alternative — Symfony's first-party StreamedJsonResponse (available in Laravel too, since it ships symfony/http-foundation) or plain generators plus json_encode — has been evaluated and rejected for a concrete, documented reason.

Look elsewhere (in practice: always, for this one):

  • Archived status alone is disqualifying for production. No security response path, no compatibility updates, no bug fixes.
  • Zero dependents and 10 stars means no ecosystem pressure-testing — you will be the first to hit most edge cases.
  • Single maintainer with the repo closed means no bus factor.
  • Laravel-first shops should reach for response()->stream(), StreamedJsonResponse, LazyCollection, and chunked JsonResponse construction. That covers the overwhelming majority of real streaming needs with maintained, first-party code.
  • If your payloads fit comfortably in memory, the complexity is unjustified — json_encode on a well-shaped array is faster and simpler than any abstraction over it.

How to Pitch It (Stakeholders)

To executives: This is a low-value evaluation that resolved quickly and cheaply. The package is an archived, single-maintainer Symfony bundle with negligible adoption and no dependents — it does not meet our bar for a production dependency and will not enter the vendor risk register. The useful takeaway is the pattern it demonstrates: streaming JSON output to keep memory flat on large responses. We can capture that pattern with maintained, first-party components and no new dependency, which is the recommendation.

To engineering: It is a Symfony bundle wrapping a streaming/incremental JSON encoder — services in the container, serializer integration, and the ability to emit JSON as records are produced rather than buffering the whole structure. The concept is sound and worth a short spike if we have export or large-payload endpoints that are memory-bound. The package itself is not: archived since 2024, one maintainer, zero dependents, ten stars. Recommended path is a timeboxed spike (1–2 days) against Symfony's StreamedJsonResponse or a generator-plus-json_encode implementation, using this repo as a reference for API shape only. No production dependency, no fork, no procurement. If the spike proves the pattern out, we write an ADR and move on.

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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
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