- What is pepperfm/filament-json used for in Laravel?
- pepperfm/filament-json provides Filament components for displaying JSON as tree or table content in Laravel admin panels. It is aimed at read-only inspection of nested configuration, metadata, audit logs, and API payloads, with formatting, validation, and readable previews. It is a presentation-layer package, not a full JSON write-back editor.
- How do I install pepperfm/filament-json with Composer?
- Install it with Composer using composer require pepperfm/filament-json, then confirm the package service provider or Filament plugin registration steps in the README. Most Laravel packages are auto-discovered, but Filament plugins often need explicit registration in a panel provider. After installation, clear cached config and assets if the component does not appear.
- Which Laravel and Filament versions does pepperfm/filament-json support?
- The 5.x line is built around Filament's native state lifecycle, but you should check the package composer.json and README for the exact Filament major and PHP version constraints. The evaluation notes CI tests and style checks on 5.x, not a guarantee for every host application Filament version. Verify Livewire and asset build compatibility before rolling out to production.
- How do I display a JSON column in a Filament resource using pepperfm/filament-json?
- Use the package JSON field or component inside a Filament resource, form, or table schema, pointing it at the JSON column or computed state. It renders structured Tree or Table content, and you can choose inline, modal, or drawer presentation depending on the component configuration. Confirm the exact namespace and field options against the README for your Filament version.
- Does pepperfm/filament-json support inline, modal, and drawer display modes?
- Yes, the package supports inline, modal, and drawer render modes for JSON content. These modes let you keep resource forms compact while still giving administrators a readable structured view. Test each mode after upgrades because Filament state resolution and Blade escaping changes can affect rendered output.
- Can I use pepperfm/filament-json to edit and save JSON, or is it read-only?
- The package is best treated as a read-only JSON inspection and preview component, not a write-back editor, despite the word editing in its blurb. The technical evaluation explicitly warns against using it for write-back without validating behavior. If you need bidirectional JSON editing, verify the package current feature set or consider a dedicated editor component.
- How does pepperfm/filament-json handle formatting, validation, and readable JSON previews?
- It formats JSON into readable tree or table previews and can participate in Filament validation flow. Raw JSON strings can be decoded into structured content, which makes nested payloads easier to inspect. Validation behavior should still be tested with your own fixtures, especially for invalid JSON and scalar values.
- What changed in pepperfm/filament-json 5.0.2 and is it safe to upgrade?
- Version 5.0.2 is a patch release but includes runtime behavior changes in edge cases, so treat it as more than a no-op update. It aligns better with Filament native state lifecycle and improves handling of valid falsy JSON values, but existing panels may render differently. Install it in a branch and run regression tests against 5.0.1 output before production.
- Why are false, 0, "0", or empty strings showing in my JSON output after upgrading?
- In 5.0.2, filterNullable() removes only null rather than all empty or falsy values, so false, 0, "0", and empty strings can now appear in output. Raw JSON strings are also decoded into structured Tree or Table content, which may change how literal text columns render. If a column is meant to stay literal text, confirm the component configuration or avoid applying the JSON view to it.
- How should I test pepperfm/filament-json with large or untrusted JSON payloads?
- Tree and table rendering can create large DOM structures, so set practical payload-size limits and test memory usage with representative JSON. For untrusted JSON, verify that scalar output is consistently escaped and avoid rendering untrusted HTML; the package is safest for internal admin tooling. Before production, cover valid JSON strings, invalid JSON, false, 0, "0", empty strings, null, arrays, collections, computed state, relationship state, and all render modes in your regression fixtures.