- What does the stepanenko3/nova-json package do?
- It provides a JSON field wrapper for Laravel Nova that lets you define multiple sub-fields which are resolved into a single model attribute. Each piece of data stored in a JSON column can then be validated and edited separately in Nova forms and detail views. It is an extension layer for Nova, not a replacement for your model or database structure.
- How do I install stepanenko3/nova-json in a Laravel Nova project?
- Install it with Composer, for example composer require stepanenko3/nova-json, then use the provided JSON field class inside your Nova resource fields. Because it is a Nova field package, it requires an existing Laravel application with Laravel Nova installed and configured. No database migration is implied by adding the package.
- Which Laravel, Nova, and PHP versions are supported?
- The package is built for Laravel applications using Laravel Nova, but you should check the composer.json constraints in the repository for the exact PHP, Laravel, and Nova versions supported. Support depends on the release you pin, so validate compatibility against your application's exact versions before upgrading. Version mismatches are the most common cause of Nova field errors.
- Does the package validate JSON structure or only display and edit it?
- The package presents and edits JSON by mapping individual Nova fields to keys inside a single model attribute. Validation is applied per field through Nova's normal validation rules, so each stored value can be validated separately rather than validating the raw JSON string. It does not appear to enforce a JSON schema, so shape enforcement is up to the rules you attach.
- How does it handle null values, malformed JSON, and nested arrays?
- The wrapper resolves a model attribute into field values for display and writing, so behavior for null or non-array JSON depends on how the attribute is cast and what the package version does at resolution time. Version 4.1.3 specifically fixed strict-type handling in resolveAttribute, which suggests earlier releases could throw type errors on unexpected values. Test nulls, scalars, nested arrays, and malformed JSON against representative records before relying on it in production.
- Will stepanenko3/nova-json work with models using declare(strict_types=1)?
- Version 4.1.3 is a patch-level strict-type fix for resolveAttribute, so it is the version to prefer if your models or casts use strict typing. Even so, you should regression test JSON read and write behavior on strict-typed models after upgrading. Pinning the patch and running automated tests plus manual Nova resource checks is the safest sequence.
- Is upgrading from v4.1.2 to v4.1.3 safe?
- The v4.1.3 release is described as a patch-level strict-type fix with no breaking changes, new features, or deprecations indicated. The upgrade is a low-friction Composer dependency pin update rather than a schema migration. Pin it in a non-production branch, verify representative JSON records, and promote through staging before production.
- Is the package actively maintained and safe for production admin panels?
- Maintenance depends on the maintainer, and the project appears to be a single-maintainer package, so review release cadence and issue history before adopting it. It sits directly in the Nova admin UI path, so treat it as a dependency to pin and monitor. Confirm the license and your internal ability to absorb a failure or fork the field if needed.
- Are there performance concerns with large or complex JSON payloads?
- Runtime impact is minimal for typical Nova admin usage, since the field only resolves values when a resource form or detail view loads. Risk grows with large JSON payloads, deeply nested structures, or high-volume admin editing. If your JSON columns are large, test load times and consider splitting rarely edited data into separate fields.
- What are the alternatives to using a JSON field package in Nova?
- You can store JSON in a textarea or code field and validate the raw string, or model the data with dedicated database columns and Eloquent casts for stronger typing. Laravel's array and json casts combined with Nova's built-in fields can cover simpler cases without an extra dependency. The stepanenko3/nova-json wrapper is most useful when you want several distinct, individually validated Nova fields backed by one JSON attribute.