Weave Code
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

Zend Json Laravel Package

zendframework/zend-json

Convenience utilities for encoding PHP data to JSON and decoding JSON back to native types, including helpers for advanced cases. Note: this Zend Framework repository was abandoned on 2019-12-31; development continues as laminas/laminas-json.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Legacy Zend Framework 1/2 maintenance only: Critical for applications still relying on this package due to deep integration, where migration is not immediately feasible. The fixes in 3.1.2 address compatibility with PHP 7.4+, extending its viability for legacy systems stuck on older PHP versions.
  • Short-term compatibility patches: Justifies temporary adoption for teams unable to migrate to Laminas JSON or modern Laravel/Symfony alternatives, but only as a stopgap.
  • Build vs. buy: Avoid for new projects or security-sensitive applications. Prioritize PHP’s native json_encode/json_decode (95%+ coverage) or Laminas JSON (actively maintained) for all other cases. This package remains a technical debt sink—use only to prevent critical failures in legacy systems.

When to Consider This Package

  • Only if:
    • Running Zend Framework 1/2 with PHP ≤7.3 (due to PHP 7.4+ compatibility fixes in 3.1.2).
    • Unable to migrate to Laminas JSON or modern stacks (Laravel/Symfony) in the next 12–18 months.
    • Requiring prettyPrint behavior (e.g., preserving spaces after commas in JSON output) or array/string offset fixes that aren’t available in PHP’s native functions.
  • Avoid if:
    • Starting a new project (use Laravel’s built-in JSON tools or spatie/array-to-json).
    • Targeting PHP 8.x (no active support; risks breaking changes).
    • Security/compliance is a priority (package is abandoned; last update in 2019).
    • Features like JSON Schema validation or streaming are needed (use Laminas JSON or Symfony Serializer instead).

How to Pitch It (Stakeholders)

  • Executives:

    *"This package (v3.1.2) is a legacy compatibility patch—not a strategic investment. It fixes critical issues for PHP 7.4+ in old Zend Framework 1/2 apps, but adopting it locks us into unsupported tech. We must:

    1. Accelerate migration of these systems to Laminas JSON or modern stacks (Laravel/Symfony).
    2. Isolate dependencies on this package to minimize blast radius.
    3. Avoid new use cases—PHP’s native JSON functions or Laminas are 10x better supported. Budget for a migration sprint to eliminate this technical debt."*
  • Engineering:

    *"Key changes in 3.1.2:

    • PHP 7.4+ compatibility: Fixes for curly brace → square bracket offset access (prevents crashes).
    • prettyPrint tweak: Preserves spaces after commas (useful for legacy debugging).

    Action items:

    • For legacy Zend apps: Update to 3.1.2 only to avoid PHP 7.4+ deprecation warnings. Document this as a temporary fix.
    • For new features: Refactor to use json_encode or Laminas\Json.
    • Security risk: This package has no updates since 2019. Block new pull requests into it; prioritize migration.

    Alternatives:

    • Laminas\Json: Drop-in replacement with active support.
    • Laravel: Use response()->json() or collect()->toJson().
    • Symfony: Use Serializer component for advanced use cases."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests