- What is kherge/json used for in a Laravel application?
- It is a PHP library for JSON encoding, decoding, linting, and validation with object-oriented error handling and formatting. In Laravel, realistic uses are validating API or webhook payloads, checking JSON config files, and running fixture or contract checks in CI. It is not a Laravel-specific package, so simple JSON syntax checks should usually use native json_decode and json_last_error first. Reserve it for cases where its linting or schema behavior adds clear value.
- How do I install kherge/json in a Laravel project?
- Installation would normally be through Composer with the package name kherge/json, but the repository metadata is unknown, so verify availability before planning adoption. Run a branch spike against your PHP, Laravel, and Composer 2 versions, and check autoloading and dependency conflicts. Do not rely on Laravel package auto-discovery because no service provider, facade, or configuration file should be assumed.
- Is kherge/json a Laravel package with a service provider or facade?
- No. The available evaluation describes it as a narrow PHP utility for JSON linting and validation, not a Laravel package. It is unlikely to provide service providers, facades, config publishing, or framework conventions. Integrate it behind an application-owned adapter such as JsonValidatorInterface rather than scattering its classes through controllers, jobs, or form requests.
- Which Laravel and PHP versions does kherge/json support?
- The provided context does not declare a supported Laravel or PHP version matrix, and the repository metadata is unknown. You must verify PHP 8.x behavior, Composer 2 resolution, autoloading, and conflicts with Laravel framework constraints in a compatibility spike. Do not assume compatibility with current Laravel releases until tests pass on your exact target matrix.
- Does kherge/json support JSON Schema validation?
- The library is described as adding validation and detailed error handling, but the available context does not confirm which JSON Schema drafts or keywords are supported. Error-path granularity, recursion and depth limits, and malformed or hostile JSON behavior are also unclear. Test schema violations, deep nesting, large payloads, and Unicode edge cases before trusting it for schema validation.
- How should I integrate kherge/json into Laravel cleanly?
- Treat it as a utility dependency, not a framework package. Create one application-owned service, validation rule, or pipeline middleware wrapper that hides package-specific classes and exceptions, and call that adapter from your code. Prefer build-time or CI use over customer-facing request paths unless performance and failure behavior are proven. Define an exit path to native JSON checks or a maintained schema library behind the same interface.
- What are the alternatives to kherge/json for JSON validation?
- For simple JSON syntax checking, native json_decode plus json_last_error can replace linting in many Laravel applications. For schema validation, maintained options include opis/json-schema and justinrainbow/json-schema, which should be evaluated for draft support and error paths. Laravel's native validation rules can also cover basic request payload checks. Compare alternatives behind the same adapter so you can swap implementations without changing application code.
- Is kherge/json safe and maintained for production use?
- The evaluation flags high maintenance and procurement risk: low stars, an unknown repository, unclear release cadence, probable legacy PHP patterns, and a NOASSERTION license. Dependency conflict risk with modern Laravel and Composer 2 is also a concern. Pilot it only in non-critical CI or admin tooling, pin an exact version, and do not expose package-specific exceptions in public application code. Production use requires license clearance, ownership, and a removal plan.
- How do I test kherge/json before adopting it?
- Start with a branch spike and contract tests covering valid JSON, malformed JSON, schema violations, large payloads, deep nesting, and Unicode edge cases. Validate against your full supported PHP, Laravel, Composer 2, PHPUnit, and CI image matrix. Confirm stateless behavior under OPcache, queue workers, and long-running workers. Also compare results against native json_decode and a maintained schema library for the same test cases.
- What license does kherge/json use, and can I use it commercially?
- The license is reported as NOASSERTION, which means it is not clearly identified in the available metadata. That is a procurement and legal blocker for production or redistribution until counsel approves it. Do not ship it in a commercial product or distribute it with your application before confirming the actual license terms. If legal cannot clear it, fork or replace it behind your adapter.