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

hoa/json

Hoa\Json is a PHP library for parsing, encoding, and manipulating JSON documents. It provides a grammar-based parser and structured tools for working with JSON data reliably in PHP applications.

View on GitHub
Deep Wiki
Context7

Hoa\Json is a lightweight PHP library for parsing, manipulating, and serializing JSON documents. Part of the modular Hoa ecosystem, it combines a grammar-based parser with a printer, allowing JSON to be handled as structured PHP data with clear error reporting.

  • Parse and validate JSON with grammar-backed parsing
  • Access and modify nested values via path-based operations
  • Serialize PHP data structures back into JSON
  • Pretty-print output for readable documents
  • Raise descriptive exceptions for invalid JSON input
Frequently asked questions about Json
What is hoa/json used for in PHP applications?
hoa/json is a standalone, framework-agnostic PHP library for parsing, encoding, validating, and manipulating JSON documents through an object-oriented API. It is not a Laravel package and does not provide a service provider, facade, or config file. Most Laravel apps only need native json_encode and json_decode unless they specifically require hoa/json's AST-style behavior.
Does hoa/json integrate with Laravel?
No, hoa/json has no Laravel-native integration. It is a low-level utility library that would need to be called directly or wrapped in your own adapter. Laravel's native JSON functions and supported validators cover most common JSON needs.
How do I install hoa/json with Composer in a Laravel project?
You can require it with Composer, but installation may pull legacy Hoa transitive dependencies and conflict with modern PHP or Laravel constraints. Do not use --ignore-platform-reqs as a production strategy. For a greenfield Laravel app, avoid adding hoa/json unless a documented legacy constraint requires it.
Is hoa/json compatible with PHP 8 and Laravel 9, 10, or 11?
hoa/json is archived and was last released in 2017, so it predates modern PHP 8.x compatibility practices. Expect friction with Laravel 9, 10, and 11 and with PHP 8.1 through 8.3. Validate with composer why-not and a PHP version matrix in CI before relying on it.
How do I configure hoa/json in Laravel?
There is no Laravel configuration for hoa/json because it is not a Laravel package. Any setup is done in plain PHP by instantiating the library's classes directly. Keep that code behind an application-owned adapter so Hoa types do not leak into controllers, jobs, or domain services.
Can hoa/json be used for JSON Schema validation in Laravel?
hoa/json is not the right choice for a Laravel JSON Schema validation strategy. For schema validation, prefer maintained packages such as opis/json-schema or justinrainbow/json-schema. If you only need to decode and inspect JSON, Laravel's native JSON handling is usually sufficient.
How should I test a hoa/json integration in Laravel?
Start with characterization tests that capture the current behavior of every hoa/json call site. Wrap the dependency in an adapter and test the adapter contract rather than letting Hoa types spread through your code. Add CI coverage across your supported PHP and Laravel versions, plus checks for autoloading and any Hoa stream-wrapper or global-state side effects.
Is hoa/json safe for production Laravel applications?
hoa/json carries high technical risk for production: it is archived, unmaintained, and has no security patch process. It also has very low community validation, with 13 stars and zero dependents noted in its assessment. For new Laravel work, reject adoption; for legacy use, isolate and plan replacement.
What are the best alternatives to hoa/json for Laravel?
Use native json_encode and json_decode for ordinary JSON handling, and Symfony Serializer when you need structured serialization. For schema validation, evaluate opis/json-schema or justinrainbow/json-schema; for streaming large JSON, evaluate halaxa/json-machine; for JSONPath, choose a maintained JSONPath package.
How do I migrate away from hoa/json in a Laravel codebase?
Inventory every call site, write characterization tests around current behavior, and wrap hoa/json behind an application-owned adapter. Replace the adapter implementation in non-critical paths first, validate in production, and then remove the Composer dependency. If short-term retention is unavoidable, fork or vendor the package, pin the exact version, and add CI coverage.
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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource