JSON capabilities
JSON support
Common manifest fields:Sample JSON declaration in manifest.json
Example JSON declaration in manifest.json:
Output path
Extension.js emits JSON resources by feature context (for example, DNR and storage schema outputs):Development behavior
- Extension.js tracks manifest-referenced JSON files as file dependencies.
- JSON edits trigger recompilation.
- When a manifest edit adds, removes, or renames a JSON reference, a running
extension devsession restarts its compiler by itself.
Validation behavior
Extension.js validates:- JSON syntax for referenced resources
- DNR ruleset shape (array-based ruleset expectations)
- Managed storage schema shape (object-based expectations)
Rulesets that Chrome refuses
A Chromium build warns about twodeclarativeNetRequest ruleset shapes. Chrome refuses to load the whole extension over either one, and Firefox loads the same file.
- A repeated rule id: two rules in one ruleset share an
id. - A
regexFilterthat Chrome cannot compile: the filter has a lookahead, a lookbehind, or a backreference.
Environment placeholders
Extension.js replaces$EXTENSION_* placeholders in emitted .json assets during compilation, using the same pass as static HTML placeholder replacement.
Best practices
- Keep manifest-referenced JSON focused on browser-required resource formats.
- Validate JSON resources in continuous integration (CI) before packaging.
- Prefer stable file paths in manifest, because each path change restarts the compiler of the dev session.
- For app data consumed by code, consider JSON imports in JS/TS modules separately from manifest resource JSON.
Next steps
- Continue with icons in development.
- Learn about manifest development behavior.

